Skip to content

Commit 41d198c

Browse files
committed
fix netty mem pool
1 parent 906438a commit 41d198c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Netty/Netty技术细节源码分析/内存池之从内存池申请内存.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
该文所涉及的netty源码版本为4.1.16。
22

33
## Netty内存池申请内存流程
4-
在通股票PooledByteBufAllocator中向内存池中进行内存申请的时候,最先开始的步骤便是从PooledByteBufAllocator中一系列PoolArena数组中,选择其中一个PoolArena进行分配。
4+
在通过PooledByteBufAllocator向内存池中进行内存申请的时候,最先开始的步骤便是从PooledByteBufAllocator中一系列PoolArena数组中,选择其中一个PoolArena进行分配。
55

66
这时将会从PoolArena数组中选取当前使用量最小的PoolArena与当前线程通过ThreadLocal进行绑定,之后涉及到内存申请将会直接从这个PoolArena进行获取,这个做法在高并发情况下频繁往内存池中进行内存申请的时候可以减少资源竞争,提升效率。
77

0 commit comments

Comments
 (0)