Home / Function/ Chunk() — netty Function Reference

Chunk() — netty Function Reference

Architecture documentation for the Chunk() function in AdaptivePoolingAllocator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9e6dbf14_26ff_f501_00e5_f05f951e6c99["Chunk()"]
  23afb641_57b1_7630_1fc4_b3b5fbd670a0["BuddyChunkController"]
  9e6dbf14_26ff_f501_00e5_f05f951e6c99 -->|defined in| 23afb641_57b1_7630_1fc4_b3b5fbd670a0
  deffd968_35b6_23b3_53db_5f6b8278c6ce["BuddyChunk()"]
  9e6dbf14_26ff_f501_00e5_f05f951e6c99 -->|calls| deffd968_35b6_23b3_53db_5f6b8278c6ce
  b550a3a7_b98a_e36b_d58d_413aa6587ed4["allocate()"]
  9e6dbf14_26ff_f501_00e5_f05f951e6c99 -->|calls| b550a3a7_b98a_e36b_d58d_413aa6587ed4
  006e8f47_e5d6_8354_9cd4_12fe398c12dd["add()"]
  9e6dbf14_26ff_f501_00e5_f05f951e6c99 -->|calls| 006e8f47_e5d6_8354_9cd4_12fe398c12dd
  style 9e6dbf14_26ff_f501_00e5_f05f951e6c99 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java lines 772–784

        @Override
        public Chunk newChunkAllocation(int promptingSize, Magazine magazine) {
            int maxChunkSize = this.maxChunkSize.get();
            int proposedChunkSize = MathUtil.safeFindNextPositivePowerOfTwo(BUFS_PER_CHUNK * promptingSize);
            int chunkSize = Math.min(MAX_CHUNK_SIZE, Math.max(maxChunkSize, proposedChunkSize));
            if (chunkSize > maxChunkSize) {
                // Update our stored max chunk size. It's fine that this is racy.
                this.maxChunkSize.set(chunkSize);
            }
            BuddyChunk chunk = new BuddyChunk(chunkAllocator.allocate(chunkSize, chunkSize), magazine);
            chunkRegistry.add(chunk);
            return chunk;
        }

Domain

Subdomains

Frequently Asked Questions

What does Chunk() do?
Chunk() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java.
Where is Chunk() defined?
Chunk() is defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java at line 772.
What does Chunk() call?
Chunk() calls 3 function(s): BuddyChunk, add, allocate.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free