buf_size: add modification hooks