I am having trouble overflowing the stack. 

How big is the stack?

Pilot main is called by the OS.
This function calls a "normal launch" function which calls a third
function which calls a 4th and a 5th.  the last three functions can open
forms, but I never pass large data structures - only pointers.

If an alarm rings when I am the 5th form Pilot main will call a certain
"diplay alarm" like function which calls the 4th and then the 5th
function above (opening duplicate forms - yes wasteful of RAM but it
shouldn't affect the stack).  But at this I overflow the at the (5th)
FrmInitForm call.


I am not an expert programmer.  But I would have thought that the two
"instances" of the program (the NormalLunch and the DisplayAlarm) would
be using a different stack and even if they weren't it is only 8 levels
deep.  I would have thought C and PalmOS could handle at least 50.

How big is the stack anyway?

How deep can I __safely__ nest my function calls (assuming I stick to
passing only one or two pointers)?  Maybe my overloading the stack is
what is causing all the API crashes I am having lately (see previous
messages).





derik      
 
                     email:  [EMAIL PROTECTED]

                     WWW:    http://www.pobox.com/~derik


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to