>In palm-dev-forum, Gavin Maxwell wrote:
>>The actual size of the stack varies
>>depending on the OS version/device you have - but is typcially 
>>around a few kilobytes in size. So if you have something like this:
>>
>>Char BigLocalVar[ 10000 ];
>>
>>you'll likely get the error.
>
>From: Ron Nicholson <[EMAIL PROTECTED]>
>Date: Sun, 25 Aug 2002 20:08:56 -0700
>
>C subroutines do not initialize their local variables. 
> So you won't get a stack error on the above...    until you start 
>writing to elements of the large local array (or when reading 
>elements on a system with memory page protection).

Not quite right.......

If you have say
        Char BigLocalVar[ 10000 ];
        Int16 i;
and then write to 'i', you'll hit a stack problem
Also if you call a function after declaring 'BigLocalVar' you'll hit 
a stack problem.

Roger Stringer
Marietta Systems, Inc.



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

Reply via email to