How to change stack size ou to clean it!
Simon Pesant
pesantsi@hotmail.com
Mon Apr 2 10:52:00 GMT 2001
How can i change the stack size??? Or How can i clean it up!!
ÃÂ
When you use Codewarrior (versions r6 and earlier, as of this article's publishing date), the call stack is not always immediately cleaned up when a function returns. As a result, you can get a stack overflow if you repeatedly call another function from within one function in certain circumstances. To work around this, set the stack_cleanup pragma to "on".
Here is an example:
ÃÂ #pragma stack_cleanup on
Please note that setting this pragma to "on" slows down execution. In most cases, this pragma does not need to be turned on, but occasionally it might be necessary. The easiest way to determine whether you need this pragma turned on is to examine the compiled code of your application to see whether the stack pointer (register A7) is changed at the time you need it to be. The 3.0 versions of the Palm OS Emulator can tell you whether you are overflowing your stack.
Is there something like that in gcc???
Simon Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com .
More information about the Gcc
mailing list