Allocate from heaps downward by default.

This commit is contained in:
Unknown W. Brackets 2013-10-13 18:27:53 -07:00
parent 4b2dccd367
commit 9a9c4cbea6

View File

@ -153,8 +153,9 @@ int sceHeapAllocHeapMemory(u32 heapAddr, u32 memSize) {
Heap *heap = heapList[heapAddr];
if (!heap)
return SCE_KERNEL_ERROR_INVALID_ID;
u32 addr = heap->alloc.Alloc(memSize, heap->fromtop);
DEBUG_LOG(HLE,"sceHeapAllocHeapMemory(%08x, %08x)", heapAddr, memSize);
// Always goes down, regardless of whether the heap is high or low.
u32 addr = heap->alloc.Alloc(memSize, true);
DEBUG_LOG(HLE, "sceHeapAllocHeapMemory(%08x, %08x)", heapAddr, memSize);
return addr;
}