| View previous topic :: View next topic |
| Author |
Message |
pegasus2000
Joined: 12 Jul 2006 Posts: 160
|
Posted: Sun Sep 07, 2008 7:43 pm Post subject: sceKernelCreateThread 80020190 |
|
|
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. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sun Sep 07, 2008 10:33 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
pegasus2000
Joined: 12 Jul 2006 Posts: 160
|
Posted: Sun Sep 07, 2008 10:41 pm Post subject: |
|
|
| 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 ? |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Sun Sep 07, 2008 11:21 pm Post subject: |
|
|
| I've ever used something like PSP_HEAP_SIZE_KB(-2*1024); and it works great under Fat and Slims! |
|
| Back to top |
|
 |
|