MorphOS Developer
Posts: 588 from 2003/2/24
From: finland, the l...
Quote:
domenikov wrote:
Trying a 'stack 512000' command before launching Stockfish for MorphOS unfortunately didn't change things, executable has the same problems.
On MorphOS the "Stack" command changes the 68k stack size, and is only used for emulated legacy 68k applications.
Native MorphOS applications are supposed to provide enough stack storage themselves. The application writer knows the required stack size the best and thus the application itself should specify the required size for correct operation.
To set the stack size to 512000 in libnix (-noixemul) application you should do the following in the application code:
Code:
For ixemul applications that stack can be set with "ixstack" command:
Code:
ixstack 512000 path:to/binary
You can verify the currently specified stack size of ixemul compiled binary with:
Code:
ixstack -l path:to/binary
Finally, in case you use pthread and you want to set the stack size for the specific thread, use pthread_attr_setstacksize as seen in macOS specific code here:
src/thread_win32_osx.h#L50