mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 06:44:10 +02:00
Heap fix
This commit is contained in:
parent
80007037d7
commit
e3db26004b
1 changed files with 2 additions and 2 deletions
|
@ -180,10 +180,10 @@ ContiguousHeap::AllocRef ContiguousHeap::Alloc(int size)
|
||||||
if (block->mKind == ChBlockKind_Merged)
|
if (block->mKind == ChBlockKind_Merged)
|
||||||
{
|
{
|
||||||
itr--;
|
itr--;
|
||||||
if (mFreeIdx >= mFreeList.mSize)
|
|
||||||
mFreeIdx = 0;
|
|
||||||
block->mKind = (ChBlockKind)0;
|
block->mKind = (ChBlockKind)0;
|
||||||
mFreeList.RemoveAtFast(mFreeIdx);
|
mFreeList.RemoveAtFast(mFreeIdx);
|
||||||
|
if (mFreeIdx >= mFreeList.mSize)
|
||||||
|
mFreeIdx = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue