3DS: Use malloc instead of linearAlloc for most things

This commit is contained in:
Jeffrey Pfau 2015-08-31 20:05:31 -07:00
parent f77cdf4eda
commit 33e3fb9a45
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);