内存管理-PooledByteBufAllocator-Chunk

 代码示例

public static void main(String[] args) {
        PooledByteBufAllocator allocator = PooledByteBufAllocator.DEFAULT;
        int chunkSize = 1 * 1024 * 1024;
        ByteBuf byteBuf = allocator.heapBuffer(chunkSize);
        int chunkSize2 = 9 * 1024;
        ByteBuf byteBuf2 = allocator.heapBuffer(chunkSize2);
        byteBuf.release();
        byteBuf2.release();
        ByteBuf byteBuf3 = allocator.heapBuffer(chunkSize2);
        byteBuf3.release();
    }

 

Arena

内存管理-PooledByteBufAllocator-Chunk

 

 

PoolThreadCache

内存管理-PooledByteBufAllocator-Chunk

 

 

上一篇:Qt状态栏添加临时消息和永久消息


下一篇:分布式块存储系统Ursa的设计与实现