Skip to content
Advertisement

Tag: page-fault

Dynamic expansion of the Linux stack

I’ve noticed the Linux stack starts small and expands with page faults caused by recursion/pushes/vlas up to size getrlimit(RLIMIT_STACK,…), give or take (defaults to 8MiB on my system). Curiously though, if I cause page faults by addressing bytes directly, within the limit, Linux will just regularly segfault without expanding the page mapping (no segfault though, if I do it after

Advertisement