Fix issue in PoolAllocator: Use default base allocator instead of free()
This commit is contained in:
parent
e8a5d2ceba
commit
b62c0cf100
|
@ -137,7 +137,7 @@ void* PoolAllocator::allocate(size_t size) {
|
|||
mMemoryBlocks = static_cast<MemoryBlock*>(MemoryManager::getBaseAllocator().allocate(mNbAllocatedMemoryBlocks * sizeof(MemoryBlock)));
|
||||
memcpy(mMemoryBlocks, currentMemoryBlocks, mNbCurrentMemoryBlocks * sizeof(MemoryBlock));
|
||||
memset(mMemoryBlocks + mNbCurrentMemoryBlocks, 0, 64 * sizeof(MemoryBlock));
|
||||
free(currentMemoryBlocks);
|
||||
MemoryManager::getBaseAllocator().release(currentMemoryBlocks, mNbCurrentMemoryBlocks * sizeof(MemoryBlock));
|
||||
}
|
||||
|
||||
// Allocate a new memory blocks for the corresponding heap and divide it in many
|
||||
|
|
Loading…
Reference in New Issue
Block a user