News for hackers. Stuff that matters.
Re:Show HN: The C3 programming language (C alternative langu... by lerno on Friday April 11, 2025 @09:03PM (#43660351)
A stack allocator is an allocator that aside from allocate, has a push and a pop function. Image an arena allocator (aka bump allocator), where ”push” stores the current start of free memory, and ”pop” resets to this point, erasing all allocations between push and pop. This is a stack allocator.

It is similar to the function stack, but push and pop can be arbitrarily granular, as opposed to only happening at entry/exit.

There are no comments on this comment yet.