> Thanks for the info. Does the above check guarantee that the local variable is
> actually allocated on the stack? With respect, what
> if the compiler was using a register to store the local variable?

Well, if the compiler didn't put the variable on the stack, then how could it
generate its address?  It can't, therefore, the variable *is* on the stack.
QED.

> Why not use the value of the A7 register instead?

Because that would require hacking up a little assembly code to fetch it.
Taking the address of a local variable is good enough and doesn't require
assembly.


> Anyway, confession time! I'm actually allocating my own stack prior to calling
> TimSetSeconds. If I don't then I actually get the
> stack overflow error at some point later via gremlins.

> I'd certainly appreciate finding out exactly why the NotifyMgr is having a
hard
> time.

Well, allocating your own stack would explain a lot.  If the stack pointer is in
this seperate block, then it's outside the range returned by SysStackInfo.

If you want a larger stack, then use the mechanism for creating a larger
application by specifying the value you want in the application's 'pref'
resource.

     <http://oasis.palm.com/devzone/knowledgebasearticle.cfm?article_id=1214>

-- Keith Rollin
-- Palm OS Emulator engineer




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

Reply via email to