mirror of
https://github.com/wiiu-env/MemoryMappingModule.git
synced 2024-11-25 11:16:53 +01:00
Fix the alloc and free functions to use all heaps
This commit is contained in:
parent
5d38198e41
commit
667a90d7ed
@ -376,7 +376,7 @@ void* MemoryMapping::alloc(uint32_t size, uint32_t align){
|
|||||||
DEBUG_FUNCTION_LINE("break %d",i);
|
DEBUG_FUNCTION_LINE("break %d",i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
res = MEMAllocFromExpHeapEx((MEMHeapHandle) mem_mapping->effective_start_address, size, align);
|
res = MEMAllocFromExpHeapEx((MEMHeapHandle) mem_mapping[i].effective_start_address, size, align);
|
||||||
if (res != NULL) {
|
if (res != NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -395,8 +395,8 @@ void MemoryMapping::free(void* ptr){
|
|||||||
DEBUG_FUNCTION_LINE("break %d",i);
|
DEBUG_FUNCTION_LINE("break %d",i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(ptr_val > mem_mapping->effective_start_address && ptr_val < mem_mapping->effective_end_address){
|
if(ptr_val > mem_mapping[i].effective_start_address && ptr_val < mem_mapping[i].effective_end_address){
|
||||||
MEMFreeToExpHeap((MEMHeapHandle) mem_mapping->effective_start_address, ptr);
|
MEMFreeToExpHeap((MEMHeapHandle) mem_mapping[i].effective_start_address, ptr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user