Closed githubaf closed 3 years ago
since this affects each function entry/exit and slows down, I consider this option as a very bad idea. Better give your application a sufficient stack size.
Sure, the overhead is there. (I actually wanted to test the time overhead in my application right now) But if the code has recursive calls you never know in advance how much stack is needed, do you?
How can I enforce a minimum stack? (apart from stack command in cli?)
I added a line unsigned long __stack={1000000}; // are the {} necesarry?
and linked libnix/lib/swapstack.o to the program. I always use -noixemul. The program still crashes.
Is that supposed to do the job?
How can I enforce a minimum stack? (apart from stack command in cli?)
I added a line unsigned long __stack={1000000}; // are the {} necesarry?
and linked libnix/lib/swapstack.o to the program. I always use -noixemul. The program still crashes.
Is that supposed to do the job?
I guess you have to add the file /opt/amiga/m68k-amigaos/libnix/lib/swapstack.o
to the link command and use __stack
:
* Usage: Define some variable 'unsigned long __stack={desired size};'
* somewhere in your code and link with this module.
Ok, thanks. That seem not to work correctly. (only partly) I will open another issue.
I tried to compile/link a program with -noixemul -mstackextend -lstack but get an error message error: unrecognized command line option '-mstackextend';
How can I get stack extension?