fix hugeAlloc

This commit is contained in:
lax1dude 2024-11-01 17:49:21 -07:00
parent 9181299a6d
commit cd8066757b

View File

@ -241,7 +241,7 @@ public final class LaxMalloc {
// iterate all free huge chunks // iterate all free huge chunks
Address addrIterator = chunkPtr; Address addrIterator = chunkPtr;
while((addrIterator = readChunkNextFreeAddr(addrIterator)).getInt() != chunkPtr.getInt()) { do {
int chunkSize = readChunkSize(addrIterator); int chunkSize = readChunkSize(addrIterator);
if(chunkSize - 8 >= sizeBytes) { // size - 2 ints if(chunkSize - 8 >= sizeBytes) { // size - 2 ints
@ -259,7 +259,7 @@ public final class LaxMalloc {
return ret; return ret;
} }
} }while((addrIterator = readChunkNextFreeAddr(addrIterator)).getInt() != chunkPtr.getInt());
} }
// no free huge chunks found, time to sbrk // no free huge chunks found, time to sbrk