How do functions like alloca allocate memory from the stack?
The `alloca()` function allocates memory from the stack by calling the `__chkstk()` function to probe the stack and ensure the allocation doesn't skip over the guard page, before adjusting the stack pointer for the requested memory. This same probing mechanism is used for both initial stack frame creation and dynamic allocations via `alloca()`, as demonstrated through x86-64 compiler-generated code.