From 44676078ee3050fba395e9f502d3d5b63fc9b4e6 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 7 Dec 2021 20:44:00 +0100 Subject: [PATCH] Do not flush heap header to gain performance --- source/memory_mapping.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/source/memory_mapping.cpp b/source/memory_mapping.cpp index bfc788f..eb0aa88 100644 --- a/source/memory_mapping.cpp +++ b/source/memory_mapping.cpp @@ -402,15 +402,6 @@ void *MemoryMapping_allocEx(uint32_t size, int32_t align, bool videoOnly) { res = MEMAllocFromExpHeapEx(heapHandle, size, align); 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) { break; } @@ -443,15 +434,6 @@ void MemoryMapping_free(void *ptr) { MEMFreeToExpHeap((MEMHeapHandle) mem_mapping[i].effective_start_address, ptr); 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; } }