I need help from you.
I am investigating about the malfunction of nd under some versions
of custom firmwares in PSP-FAT.
I have discovered this: when nd tries to execute sceKernelCreateThread,
it receives a code 80020190 (no memory) from kernel (I have tried in PSP-FAT custom firmware vers. 3.71 M33-4)
It seems that the trouble is that the kernel memory area is saturated (nd loads a lot of prx drivers at startup). In fact, if I disable the network support, the error doesn't occur again.
The error appears under some firmware, but in other version it doesn't. For example, there is no error in PSP-SLIM custom firmware 3.71 M33-4).
I have a question: is it possible to disable some PRX that are loaded automatically by kernel at startup and that aren't useful for my application?
Or is it possible to increase the area of the memory that is reserved for kernel ?
Thanks a lot for someone that wants to help me.
sceKernelCreateThread 80020190
Are these user threads, or kernel-mode? If user, you're setting the heap size too big. To make one executable for both the Phat and the Slim, use
PSP_HEAP_SIZE_KB(-X_KB);
to reserve all but X KB of memory for the user heap. You need to leave space apart from the heap for the stacks of the threads being created. The most common cause of thread creation failure is the use of PSP_HEAP_SIZE_MAX();.
Using a negative heap size is much easier than trying to guess heap sizes for both the Phat and Slim.
PSP_HEAP_SIZE_KB(-X_KB);
to reserve all but X KB of memory for the user heap. You need to leave space apart from the heap for the stacks of the threads being created. The most common cause of thread creation failure is the use of PSP_HEAP_SIZE_MAX();.
Using a negative heap size is much easier than trying to guess heap sizes for both the Phat and Slim.
-
- Posts: 160
- Joined: Wed Jul 12, 2006 7:09 am
J.F. wrote:Are these user threads, or kernel-mode? If user, you're setting the heap size too big. To make one executable for both the Phat and the Slim, use
PSP_HEAP_SIZE_KB(-X_KB);
to reserve all but X KB of memory for the user heap. You need to leave space apart from the heap for the stacks of the threads being created. The most common cause of thread creation failure is the use of PSP_HEAP_SIZE_MAX();.
Using a negative heap size is much easier than trying to guess heap sizes for both the Phat and Slim.
Ok, Joseph, but there is a thing that it doesn't explain itself.
Nd reserves 1 Mb for the stack of the user thread, and this quantity
is the same under FAT and under SLIM.
Why the system works under SLIM and it doesn't under FAT ?