mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-10 03:01:56 -04:00
Fix getMaxAllocatableSize & CMemBlock::getBlock on 64-bit
This commit is contained in:
@@ -313,8 +313,8 @@ u8 JKRHeap::getCurrentGroupId() {
|
||||
}
|
||||
|
||||
u32 JKRHeap::getMaxAllocatableSize(int alignment) {
|
||||
u32 maxFreeBlock = (uintptr_t)getMaxFreeBlock();
|
||||
u32 ptrOffset = (alignment - 1) & alignment - (maxFreeBlock & 0xf);
|
||||
uintptr_t maxFreeBlock = (uintptr_t)getMaxFreeBlock();
|
||||
uintptr_t ptrOffset = (alignment - 1) & alignment - (maxFreeBlock & (MEM_BLOCK_SIZE - 1));
|
||||
return ~(alignment - 1) & (getFreeSize() - ptrOffset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user