buffer: WIP implement buffers using smalloc