From 8d66b23f45ad9b17f846b77109e6ecdcafa62bfd Mon Sep 17 00:00:00 2001 From: Seeky <58006653+SeekyCt@users.noreply.github.com> Date: Wed, 8 Jan 2025 21:26:56 +0000 Subject: [PATCH] Match smartGarbage --- src/memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/memory.c b/src/memory.c index 03d7213..593bb00 100644 --- a/src/memory.c +++ b/src/memory.c @@ -502,7 +502,6 @@ SmartAllocation * smartAlloc(size_t size, u8 type) } } -// NON_MATCHING void smartGarbage() { sysWaitDrawSync(); @@ -562,8 +561,8 @@ void smartGarbage() // Update spaceAfter of final allocation, since assumption it'd be 0 wasn't true if (swp->allocatedEnd != NULL) { - // This line isn't matching - swp->allocatedEnd->spaceAfter = (u32) swp->heapStart + GET_SMART_HEAP_SIZE() + u32 heapSize = GET_SMART_HEAP_SIZE(); + swp->allocatedEnd->spaceAfter = (u32) swp->heapStart + heapSize - (u32) swp->allocatedEnd->data - swp->allocatedEnd->size; }