How do functions like alloca allocate memory from the stack?
Summary
Raymond Chen explains how alloca allocates memory from the stack by invoking the same stack-probing mechanism as _chkstk. The post includes a minimal C example and shows the x86-64 assembly sequence, illustrating how stack probes are performed before and during alloca usage.