2 ms·
No. Typical C function looks something like this: push %rbp mov %rsp, %rbp sub $something, %rsp ... actual code ... mov %rbp, %rsp ret The sub $so
by dfox 11y ago
No. Typical C function looks something like this:
push %rbp
mov %rsp, %rbp
sub $something, %rsp
... actual code ...
mov %rbp, %rsp
ret
The sub $something, %rsp instruction is everything that user-space does to allocate stack memory. Actual allocation of stack pages happens in kernel in a way that is completely transparent as long as the $something does not get unreasonably large.