but i have found that after unloading a prx not all the memory used is freed.
A i'm working on a SLIM with the PSP_LARGE_MEMORY option.
So after loading all the graphics and sound effects i have around 37718 KB of free memory (calling sceKernelTotalFreeMemSize).
Then I load a module with this:
Code: Select all
SceUID id = -1;
SceKernelLMOption option;
SceUID mpid = PSP_MEMORY_PARTITION_USER;
memset(&option, 0, sizeof(option));
option.size = sizeof(option);
option.mpidtext = mpid;
option.mpiddata = mpid;
option.position = 0;
option.access = 1;
SceSize am = sceKernelTotalFreeMemSize();
Log( LOG_MESSAGE, "PRXLoader::Load('%s') - Available memory before loading: %dbytes (%dKB or %dMB)", filename, am, am/1024, am/1024/1024 );
id = sceKernelLoadModule(filename, 0, &option);
sceKernelStartModule(id, 0, 0, 0, 0);
Now i stop and unload the module like this:
Code: Select all
sceKernelStopModule( id, 0, NULL, &status, NULL );
sceKernelUnloadModule( id );
So anyone knows what else must be done to free all the memory used by the module?
Well thanks in advance!