Welcome! Log In Create A New Profile Wiibrew Wiki HackMii Blog

Advanced

LWP_CreateThread fails to create 11th thread [RESOLVED]

Posted by owen 
LWP_CreateThread fails to create 11th thread [RESOLVED]
April 14, 2014 09:00PM
Re: LWP_CreateThread fails to create 11th thread
April 15, 2014 12:27AM
You're passing 0 for the stackbase argument so libogc has to allocate the stack for the new thread from its internal pool. That pool only has a limited amount of space so after a few threads it is all used up.
Either use malloc() to allocate STACKSIZE bytes and use that memory for the stackbase argument, or use a static array if you don't want to worry about free()'ing the stack after the threads end.

Edit: Suspending threads does not release their resources, it justs pauses them from running.



Edited 1 time(s). Last edit at 04/15/2014 12:27AM by tueidj.
Re: LWP_CreateThread fails to create 11th thread
April 15, 2014 01:38AM
Re: LWP_CreateThread fails to create 11th thread
April 15, 2014 05:09PM
I think I am suspending my threads instead of letting them run to completion which might be what is causing the problem. I am going to check to see if that is the cause of the problem
Re: LWP_CreateThread fails to create 11th thread
April 16, 2014 09:42PM
Sorry, only registered users may post in this forum.

Click here to login