3 ms·
stack space is always precomputed and static. You cannot reallocate after it overflows. On the other hand, the default stack size on linux is 8k, 1M is excessi
by halayli 12y ago
stack space is always precomputed and static. You cannot reallocate after it overflows.
On the other hand, the default stack size on linux is 8k, 1M is excessive and way more than you need in a sane program that doesn't have huge buffers on the stack.
Stack is not meant to use 64GB of memory, it's meant to be small to pass arguments and allocate small buffers on it. The rest of the 64GB is used for heap allocations.