First look at where it is applied to the module info:
Code: Select all
/* Declare the size of the heap (in KB) that the program wants to allocate from. */
#define PSP_HEAP_SIZE_KB(size_kb) \
unsigned int sce_newlib_heap_kb_size = (size_kb)
/* Declare to allocate maximum heap area */
#define PSP_HEAP_SIZE_MAX() \
PSP_HEAP_SIZE_KB(-1)
Code: Select all
if (&sce_newlib_heap_kb_size != NULL) {
heap_size = sce_newlib_heap_kb_size * 1024;
} else {
if (&__pspsdk_is_prx != NULL) {
heap_size = DEFAULT_PRX_HEAP_SIZE_KB * 1024;
} else {
heap_size = sceKernelMaxFreeMemSize();
}
}
Looks like whatever check there was for MAX didn't make it into libc like it was supposed to.
EDIT: Looking a bit more, the check is in libcglue.c for newlib, but not in the psplibc.