buffer allocator