replace another buffer with an allocation (dimok)