allocate() — netty Function Reference
Architecture documentation for the allocate() function in PoolThreadCache.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 610ff9ad_3424_2b92_6d1b_26798bcd0ba8["allocate()"] f4c407ea_9e8c_d00d_ea7e_e355c94f8aba["PoolThreadCache"] 610ff9ad_3424_2b92_6d1b_26798bcd0ba8 -->|defined in| f4c407ea_9e8c_d00d_ea7e_e355c94f8aba a1659e79_8236_9951_f1d0_62b19f3b2ca7["allocate()"] a1659e79_8236_9951_f1d0_62b19f3b2ca7 -->|calls| 610ff9ad_3424_2b92_6d1b_26798bcd0ba8 3d3d2bff_2825_15d9_1c0a_1051549ec76d["allocateSmall()"] 3d3d2bff_2825_15d9_1c0a_1051549ec76d -->|calls| 610ff9ad_3424_2b92_6d1b_26798bcd0ba8 e8e3b809_f6ce_ff31_6add_bfbdca5637eb["allocateNormal()"] e8e3b809_f6ce_ff31_6add_bfbdca5637eb -->|calls| 610ff9ad_3424_2b92_6d1b_26798bcd0ba8 a1659e79_8236_9951_f1d0_62b19f3b2ca7["allocate()"] 610ff9ad_3424_2b92_6d1b_26798bcd0ba8 -->|calls| a1659e79_8236_9951_f1d0_62b19f3b2ca7 562c77b5_107e_e3e8_4481_0717613d42f3["trim()"] 610ff9ad_3424_2b92_6d1b_26798bcd0ba8 -->|calls| 562c77b5_107e_e3e8_4481_0717613d42f3 style 610ff9ad_3424_2b92_6d1b_26798bcd0ba8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
buffer/src/main/java/io/netty/buffer/PoolThreadCache.java lines 157–169
@SuppressWarnings({ "unchecked", "rawtypes" })
private boolean allocate(MemoryRegionCache<?> cache, PooledByteBuf buf, int reqCapacity) {
if (cache == null) {
// no cache found so just return false here
return false;
}
boolean allocated = cache.allocate(buf, reqCapacity, this);
if (++ allocations >= freeSweepAllocationThreshold) {
allocations = 0;
trim();
}
return allocated;
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does allocate() do?
allocate() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/PoolThreadCache.java.
Where is allocate() defined?
allocate() is defined in buffer/src/main/java/io/netty/buffer/PoolThreadCache.java at line 157.
What does allocate() call?
allocate() calls 2 function(s): allocate, trim.
What calls allocate()?
allocate() is called by 3 function(s): allocate, allocateNormal, allocateSmall.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free