mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 12:00:17 +02:00
FEXCore: Fixes ever shrinking JIT code buffer
I accidentally replaced a couple usages of `AllocatedSize` with `GetAllocatedSize()`. This resulted in a JIT buffer that ran out of space would actually allocate a slightly smaller buffer each time, and then it cascades downwards resulting in catastrophic performance. Fix the use in `SharedCodeBufferManager.cpp` and `Core.cpp` which were incorrect and renames the function to be more explicit.
This commit is contained in:
4 files changed
+13
-8
No files matched your search
@@ -71,8 +71,13 @@ struct CodeBuffer {
|
||||
return AllocatedSize - FEXCore::Utils::FEX_PAGE_SIZE;
|
||||
}
|
||||
|
||||
// Returns the full size of the buffer, including the guard page.
|
||||
size_t TotalAllocationSize() const {
|
||||
return AllocatedSize;
|
||||
}
|
||||
|
||||
// Returns the num of bytes currently allocated from the allocator.
|
||||
size_t GetAllocatedSize() const {
|
||||
size_t AllocatedSpaceUsed() const {
|
||||
return CodeBufferOffset - Ptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user