How does a stackless language work?

The modern operating systems we have (Windows, Linux) operate with what I call the “big stack model”. And that model is wrong, sometimes, and motivates the need for “stackless” languages. The “big stack model” assumes that a compiled program will allocate “stack frames” for function calls in a contiguous region of memory, using machine instructions … Read more

Increase stack size in Linux with setrlimit

Normally you would set the stack size early on, e,g, at the start of main(), before calling any other functions. Typically the logic would be: call getrlimit to get current stack size if current size < required stack size then call setrlimit to increase stack size to required size In C that might be coded … Read more