English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 15 March 2015, 14:39   #1
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Question 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?
AGS is offline  
Old 15 March 2015, 17:25   #2
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
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.
Mrs Beanbag is offline  
Old 16 March 2015, 03:13   #3
matthey
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.
matthey is offline  
Old 18 March 2015, 17:00   #4
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Quote:
Originally Posted by Mrs Beanbag View Post
maybe you have a stray pointer somewhere that is writing somewhere it shouldn't.
There really was one. Solved a lot. However this guru showed up again.
AGS is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:31.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08996 seconds with 15 queries