forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sceKernelCreateThread 80020190

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
pegasus2000



Joined: 12 Jul 2006
Posts: 160

PostPosted: Sun Sep 07, 2008 7:43 pm    Post subject: sceKernelCreateThread 80020190 Reply with quote

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
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Sep 07, 2008 10:33 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
pegasus2000



Joined: 12 Jul 2006
Posts: 160

PostPosted: Sun Sep 07, 2008 10:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Sun Sep 07, 2008 11:21 pm    Post subject: Reply with quote

I've ever used something like PSP_HEAP_SIZE_KB(-2*1024); and it works great under Fat and Slims!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group