From 9fbb7904047554f5f4db484aba835f00874f2cfe Mon Sep 17 00:00:00 2001 From: aliaspider Date: Wed, 21 Oct 2015 01:38:04 +0100 Subject: [PATCH] (CTR/3DS) heap_size can't be bigger than 0x6000000. --- frontend/drivers/platform_ctr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/drivers/platform_ctr.c b/frontend/drivers/platform_ctr.c index db8e29ff92..5cc91f12fc 100644 --- a/frontend/drivers/platform_ctr.c +++ b/frontend/drivers/platform_ctr.c @@ -72,7 +72,8 @@ void __system_allocateHeaps() { // For n3DS running with 124MB, only 110MB appears actually available app_memory = app_memory > 0x6E00000 ? 0x6E00000 : app_memory; - heap_size = (app_memory - mem_used - linear_heap_size - 0x10000) & 0xFFFFF000; + heap_size = (app_memory - mem_used - linear_heap_size - 0x10000) & 0xFFFFF000; + heap_size = heap_size > 0x6000000? 0x6000000 : heap_size; // Allocate the application heap __heapBase = 0x08000000;