[Memory]impl of allocating buffers