* Robin Kuzmin: > http://man7.org/linux/man-pages/man3/alloca.3.html > > I compare this man page with the > https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/alloca?view=vs-2017 > and I feel that a very important fragment is missing in the man page > (although strictly speaking the man page is complete), the missing > fragment is between the double asterisks (**): > > The allocated space is automatically freed when the calling function > exits **(not when the allocation merely passes out of scope)**. Note that this is only true for the Microsoft compiler. For GCC, the rules are different: An allocation with with alloca is freed when the closest enclosing scope with a VLA declaration is exited, and if no such scope exists, when the function is exited. This includes abnormal exits (through stack unwinding). The GCC documentation suggests something else; I will try to get it corrected. Thanks, Florian