Specify project per stack size? November 28, 2010 04:40PM | Registered: 13 years ago Posts: 27 |
Re: Specify project per stack size? November 28, 2010 04:43PM | Registered: 13 years ago Posts: 1 |
Quote
Linuz
To cater for Quake's hefty stack requirements I've had to increase the stack from 128K to 256K. It used to be 512, but I did some optimisation in R_RecursiveWorldNode to take the usage down.
I was wondering if there is a way to do this on a per .elf basis instead of modifying the global ogc.ld linkscript?
Thanks!
static lwp_t hmain_game = (lwp_t)NULL; int main() { ... setup code ... LWP_CreateThread( /* thread handle */ &hmain_game, /* code */ main_game, /* arg pointer for thread */ NULL, /* stack base */ NULL, /* stack size */ 512*1024, /* thread priority */ 50); LWP_SetThreadPriority(0,0); while(1); } static void* main_game(void *arg) { ... interesting stuff ... }