> >I'm getting the error :
> >
> >YourApp (1.0) just read from memory location
> >0x0003CC00, which is in the
> >unused portion of the stack.  The stack range is
> >0x0003C504 - 0x0003D2B2,
> >and the stack pointer is 0x0003D110.
> >
> >I have a local pointer variable that's pointing to
a
> >global variable, and I'm writing to the structure >
that
> >this local pointer points to. That's where the
error
> >is occurring.
> 
> It sounds like your programm is exceeding the stack
> size allocated to 
> it at 
> startup, and the stack is crawling into the section
> > of memory being 
> used by 
> global variables.  If you're using CodeWarrior, look
> into #pragma 
> warn_stack_usage as a way to find functions that are
> using large 
> amounts of 
> stack.  The default stack size is only about 4K.


I may have copied the error message wrong, it was an
error _writing to_ an address outside the stack, not
reading from it. Does that make any difference?

Also, I'm only using 5 local variables in this method;
3 pointers, an int, and a MemHandle. So I don't see
how the stack could be exceeding the stack size. And
just to be clear, the stack is only used for function
parameters and local variables, right? 

It sounds to me like it doesn't like the local pointer
being used to write to an area outside the stack. How
can I get around that? Can I do something like MemMove instead?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to