A minimal dynamic buffer in c