impl: buffer management