From 33e3fb9a454e5377515024af19111e510b5afad8 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 31 Aug 2015 20:05:31 -0700 Subject: [PATCH] 3DS: Use malloc instead of linearAlloc for most things --- src/platform/3ds/3ds-memory.c | 4 ++-- src/platform/3ds/main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/3ds/3ds-memory.c b/src/platform/3ds/3ds-memory.c index fd736fb76..fcaca953b 100644 --- a/src/platform/3ds/3ds-memory.c +++ b/src/platform/3ds/3ds-memory.c @@ -10,10 +10,10 @@ #include <3ds.h> void* anonymousMemoryMap(size_t size) { - return linearAlloc(size); + return malloc(size); } void mappedMemoryFree(void* memory, size_t size) { UNUSED(size); - linearFree(memory); + free(memory); } diff --git a/src/platform/3ds/main.c b/src/platform/3ds/main.c index 7d2928216..37f1984fe 100644 --- a/src/platform/3ds/main.c +++ b/src/platform/3ds/main.c @@ -65,7 +65,7 @@ static void _setup(struct GBAGUIRunner* runner) { } GBAVideoSoftwareRendererCreate(&renderer); - renderer.outputBuffer = anonymousMemoryMap(256 * VIDEO_VERTICAL_PIXELS * 2); + renderer.outputBuffer = linearAlloc(256 * VIDEO_VERTICAL_PIXELS * 2); renderer.outputBufferStride = 256; runner->context.renderer = &renderer.d; @@ -259,7 +259,7 @@ int main() { GBAGUIDeinit(&runner); cleanup: - mappedMemoryFree(renderer.outputBuffer, 0); + linearFree(renderer.outputBuffer); if (logFile) { logFile->close(logFile);