alloca is a memory allocator for C/C++. It’s a part of the C standard library in alloca.h. It takes a single size parameter (like malloc), and is automatically freed when the calling function returns.

However: it’s generally bad practice to use alloca. This is because it allocates in the stack frame, so it’s easy to run into stack overflow problems.