buffers: buffer allocation improvements