diff --git a/gx/mem2_manager.c b/gx/mem2_manager.c index b55e755b7b..c446bac6b5 100644 --- a/gx/mem2_manager.c +++ b/gx/mem2_manager.c @@ -72,7 +72,15 @@ bool gx_init_mem2() u32 level; _CPU_ISR_Disable(level); - u32 size = SYS_GetArena2Size() - 1024 * 128; // leave some MEM2 for libogc + // BIG NOTE: MEM2 on the Wii is 64MB, but a portion of that is reserved for + // IOS. libogc by default defines the "safe" area for MEM2 to go from + // 0x90002000 to 0x933E0000. However, from my testing, I've found I need to + // reserve about 128KB for stuff like network and USB to work correctly. + // However, other sources says these functions need at least 0xE0000 bytes, + // 7/8 of a megabyte, of reserved memory to do this. My initial testing + // shows that we can work with only 128KB, but if some stuff mysteriously + // stops working, try fiddling with this size. + u32 size = SYS_GetArena2Size() - 1024 * 128; void *heap_ptr = (void *) ROUNDUP32(((u32) SYS_GetArena2Hi() - size));