mirror of
https://github.com/wiiu-env/MemoryMappingModule.git
synced 2024-11-22 09:49:20 +01:00
Do not flush heap header to gain performance
This commit is contained in:
parent
d890a6c91e
commit
44676078ee
@ -402,15 +402,6 @@ void *MemoryMapping_allocEx(uint32_t size, int32_t align, bool videoOnly) {
|
|||||||
|
|
||||||
res = MEMAllocFromExpHeapEx(heapHandle, size, align);
|
res = MEMAllocFromExpHeapEx(heapHandle, size, align);
|
||||||
auto cur = heap->usedList.head;
|
auto cur = heap->usedList.head;
|
||||||
while (cur != nullptr) {
|
|
||||||
DCFlushRange(cur, sizeof(MEMExpHeapBlock));
|
|
||||||
cur = cur->next;
|
|
||||||
}
|
|
||||||
cur = heap->freeList.head;
|
|
||||||
while (cur != nullptr) {
|
|
||||||
DCFlushRange(cur, sizeof(MEMExpHeapBlock));
|
|
||||||
cur = cur->next;
|
|
||||||
}
|
|
||||||
if (res != nullptr) {
|
if (res != nullptr) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -443,15 +434,6 @@ void MemoryMapping_free(void *ptr) {
|
|||||||
|
|
||||||
MEMFreeToExpHeap((MEMHeapHandle) mem_mapping[i].effective_start_address, ptr);
|
MEMFreeToExpHeap((MEMHeapHandle) mem_mapping[i].effective_start_address, ptr);
|
||||||
auto cur = heap->usedList.head;
|
auto cur = heap->usedList.head;
|
||||||
while (cur != nullptr) {
|
|
||||||
DCFlushRange(cur, sizeof(MEMExpHeapBlock));
|
|
||||||
cur = cur->next;
|
|
||||||
}
|
|
||||||
cur = heap->freeList.head;
|
|
||||||
while (cur != nullptr) {
|
|
||||||
DCFlushRange(cur, sizeof(MEMExpHeapBlock));
|
|
||||||
cur = cur->next;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user