Home / Function/ onAllocateChunk() — netty Function Reference

onAllocateChunk() — netty Function Reference

Architecture documentation for the onAllocateChunk() function in PooledByteBufAllocator.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d67ae8a2_c704_a204_ef14_ed443f02bd4d["onAllocateChunk()"]
  f5ea31b4_1e4c_94f0_32cf_d4ab3e538b0a["PooledByteBufAllocator"]
  d67ae8a2_c704_a204_ef14_ed443f02bd4d -->|defined in| f5ea31b4_1e4c_94f0_32cf_d4ab3e538b0a
  style d67ae8a2_c704_a204_ef14_ed443f02bd4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java lines 837–847

    static void onAllocateChunk(ChunkInfo chunk, boolean pooled) {
        if (PlatformDependent.isJfrEnabled() && AllocateChunkEvent.isEventEnabled()) {
            AllocateChunkEvent event = new AllocateChunkEvent();
            if (event.shouldCommit()) {
                event.fill(chunk, PooledByteBufAllocator.class);
                event.pooled = pooled;
                event.threadLocal = false; // Chunks in the pooled allocator are always shared.
                event.commit();
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does onAllocateChunk() do?
onAllocateChunk() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java.
Where is onAllocateChunk() defined?
onAllocateChunk() is defined in buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java at line 837.

Analyze Your Own Codebase

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

Try Supermodel Free