, , ,

If you do cross compiling, you should remember different stack leashing styles of operating systems in concern (NYU has a pretty good comparison). For example, in Linux flavors, stack size is an environment issue. We may check the values by ulimit -s or ulimit -a.

stack - linux ulimit

Default value of stack size, which is 8192 kB, may be changed through modifying /etc/security/limits.conf just as core size and number of file handle modifications;

stack - linux size changing through limitsconf

Size changes will reflect to new terminals,

stack - linux ulimit after modification

In windows, stack size preference is sticked to executables and may be checked with dumpbin /headers which may be obtained through Visual Studio (and express if you are a poor man).

stack - windows dumpbin

Default value of stack size in visual studio builds is 100000 hex bytes, which corresponds to 1024 kB. If we want to make stack size 16384 kB as Linux case, we should link with /F option to declare desired stack size in bytes, as /F 16777216.

stack - windows link

Remember that 16777216 decimal bytes will correspond to 1000000 hex bytes and that will make 16384 kB.

stack - windows dumpbin after modification