mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-13 22:00:42 +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
@@ -88,7 +88,7 @@ fextl::shared_ptr<CodeBuffer> SharedCodeBufferManager::StartLargerCodeBuffer() {
|
||||
return GetLatest();
|
||||
}
|
||||
|
||||
auto NewCodeBufferSize = GetLatest()->GetAllocatedSize();
|
||||
auto NewCodeBufferSize = GetLatest()->TotalAllocationSize();
|
||||
NewCodeBufferSize = std::min<size_t>(NewCodeBufferSize * 2, MAX_CODE_SIZE);
|
||||
return AllocateNew(NewCodeBufferSize);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user