15 March 2015, 14:39 | #1 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
|
How much stack space do we need?
Hi,
I am encountering various strange crashes and freezes of differen type. I thought it may be that the stack is too small for my process. So I set it to 20000. Now OS 4.1 dos once complained that it has not enough memory for process creation. Guru code: 07 0b 0000. But even this error was not reproduceable. Any ideas? |
15 March 2015, 17:25 | #2 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
it would be alarming if it really couldn't reserve you a 20k stack space.
How much stack space you need obviously depends on what your application actually puts on the stack. If you are putting large objects on it or doing a lot of recursion you might need more. I've never had to increase the amount myself. But it is also possible to reserve your own space on the heap as big as you want and simply point the stack pointer at it. maybe you have a stray pointer somewhere that is writing somewhere it shouldn't. Last edited by Mrs Beanbag; 15 March 2015 at 17:31. |
16 March 2015, 03:13 | #3 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Scout will show the current amount of free stack when looking at tasks. However, a utility which shows the max stack use is more useful for estimating the stack needs. There are several on Aminet when searching for "stack" but I don't know how good they would be under AmigaOS 4. I didn't find any on OS4Depot. Some program's stack needs are dependent on the amount of data processed or use unlimited recursive function iterations which means there is not a correct amount of default stack to give them. Compilers usually have options for automatic stack extension which can be useful in these cases but is slower overall. The PPC generally needs more stack than the 68k for alignment reasons.
The guru doesn't sound like a stack problem. If you don't have much free memory, perhaps some memory was not correcly freed. |
18 March 2015, 17:00 | #4 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Found: Space Baller] Bouncing ball in space? | Kada | Looking for a game name ? | 23 | 06 April 2018 03:10 |
Stack available | mritter0 | Coders. General | 4 | 03 August 2014 18:31 |
Apollo stack? | JuvUK | support.Apps | 21 | 22 December 2008 14:59 |
[Found: Mr Wobbly Leg Versus The Invaders From Space] Space-Invaders game? | Dindel | Looking for a game name ? | 5 | 06 March 2008 10:05 |
Stack Up | Galaxy | request.Old Rare Games | 5 | 08 September 2004 03:06 |
|
|