Home / Function/ onAllocateBuffer() — netty Function Reference

onAllocateBuffer() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  04791b6b_5f8d_341e_5556_ae24a98414e4["onAllocateBuffer()"]
  f5ea31b4_1e4c_94f0_32cf_d4ab3e538b0a["PooledByteBufAllocator"]
  04791b6b_5f8d_341e_5556_ae24a98414e4 -->|defined in| f5ea31b4_1e4c_94f0_32cf_d4ab3e538b0a
  fac02def_c33a_d305_e617_e397f5a9d596["ByteBuf()"]
  fac02def_c33a_d305_e617_e397f5a9d596 -->|calls| 04791b6b_5f8d_341e_5556_ae24a98414e4
  style 04791b6b_5f8d_341e_5556_ae24a98414e4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java lines 804–814

    static void onAllocateBuffer(AbstractByteBuf buf, boolean pooled, boolean threadLocal) {
        if (PlatformDependent.isJfrEnabled() && AllocateBufferEvent.isEventEnabled()) {
            AllocateBufferEvent event = new AllocateBufferEvent();
            if (event.shouldCommit()) {
                event.fill(buf, PooledByteBufAllocator.class);
                event.chunkPooled = pooled;
                event.chunkThreadLocal = threadLocal;
                event.commit();
            }
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does onAllocateBuffer() do?
onAllocateBuffer() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java.
Where is onAllocateBuffer() defined?
onAllocateBuffer() is defined in buffer/src/main/java/io/netty/buffer/PooledByteBufAllocator.java at line 804.
What calls onAllocateBuffer()?
onAllocateBuffer() is called by 1 function(s): ByteBuf.

Analyze Your Own Codebase

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

Try Supermodel Free