mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
In TrimAllocationToSize, if a block is below the minimum allocation size,
there is no new block added to the free list. Therefore on the next startFunctionBody call, a new slab must be allocated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77520 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f485b3bbab
commit
1b10d798d7
@ -351,9 +351,12 @@ namespace {
|
||||
iter = iter->Next;
|
||||
}
|
||||
|
||||
largest = largest - sizeof(MemoryRangeHeader);
|
||||
|
||||
// If this block isn't big enough for the allocation desired, allocate
|
||||
// another block of memory and add it to the free list.
|
||||
if (largest - sizeof(MemoryRangeHeader) < ActualSize) {
|
||||
if (largest < ActualSize ||
|
||||
largest <= FreeRangeHeader::getMinBlockSize()) {
|
||||
DOUT << "JIT: Allocating another slab of memory for function.";
|
||||
candidateBlock = allocateNewCodeSlab((size_t)ActualSize);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user