all repos — mgba @ 33e3fb9a454e5377515024af19111e510b5afad8

mGBA Game Boy Advance Emulator

3DS: Use malloc instead of linearAlloc for most things
Jeffrey Pfau jeffrey@endrift.com
Mon, 31 Aug 2015 20:05:31 -0700
commit

33e3fb9a454e5377515024af19111e510b5afad8

parent

f77cdf4eda898e60cab85d8055b5115801daa7fe

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/platform/3ds/3ds-memory.csrc/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); }
M src/platform/3ds/main.csrc/platform/3ds/main.c

@@ -65,7 +65,7 @@ runner->context.gba->stream = &stream;

} 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 @@ GBAGUIRunloop(&runner);

GBAGUIDeinit(&runner); cleanup: - mappedMemoryFree(renderer.outputBuffer, 0); + linearFree(renderer.outputBuffer); if (logFile) { logFile->close(logFile);