Skip to content

Instantly share code, notes, and snippets.

@jhaberstro
jhaberstro / ScopeStackDemo.cpp
Created November 5, 2010 22:00
ScopeStack implementation stolen from Andreas Fredriksson's DICE presentation on Scope Stack Allocation.
// Simplified scope stack implementation
#include <new>
#include <cstdio>
#include <cassert>
typedef unsigned char u8;
class LinearAllocator {
public: