To get the auto-release behavior of alloca(), you can use a pair of classes instead of one class. An Allocator class can handle allocating the main buffer and keeping track of where the top of the stack (next allocation) is located. When you request a block of memory, the Allocator can return, not a pointer, but an object, the destructor of which takes care of deallocating the memory. So the usage might look like this:
Code:
Allocator myAlloc(1024*1024); // 1 MB buffer
..
..
Allocation a = myAlloc.allocate(128); // allocate 128 bytes
void* buffer = a.get(); // get the pointer to the underlying data
..
// use the buffer for stuff
..
// about to go out of scope. The 'a' object will be destructed and take care of releasing the memory back to the Allocator