Home / Function/ initBuf() — netty Function Reference

initBuf() — netty Function Reference

Architecture documentation for the initBuf() function in PoolChunk.java from the netty codebase.

Function java Buffer Search calls 4 called by 1

Entity Profile

Dependency Diagram

graph TD
  6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed["initBuf()"]
  271be16e_fb25_9fe6_0749_cf5dd80dd903["PoolChunk"]
  6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed -->|defined in| 271be16e_fb25_9fe6_0749_cf5dd80dd903
  dc4b66ae_8f51_844d_74c5_b56fbafe898a["allocate()"]
  dc4b66ae_8f51_844d_74c5_b56fbafe898a -->|calls| 6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed
  84c148a2_d160_9465_4de0_96875dcb9627["isSubpage()"]
  6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed -->|calls| 84c148a2_d160_9465_4de0_96875dcb9627
  0a6285e7_f5a0_2309_9441_672954c343b9["initBufWithSubpage()"]
  6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed -->|calls| 0a6285e7_f5a0_2309_9441_672954c343b9
  1bdfe3f7_3884_814f_0eb6_924b6a843c79["runSize()"]
  6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed -->|calls| 1bdfe3f7_3884_814f_0eb6_924b6a843c79
  22016f68_b853_63ea_32c8_c288b8996440["runOffset()"]
  6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed -->|calls| 22016f68_b853_63ea_32c8_c288b8996440
  style 6dc0c69f_ef55_2ceb_be1e_ae840dbf3fed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/PoolChunk.java lines 606–615

    void initBuf(PooledByteBuf<T> buf, ByteBuffer nioBuffer, long handle, int reqCapacity,
                 PoolThreadCache threadCache, boolean threadLocal) {
        if (isSubpage(handle)) {
            initBufWithSubpage(buf, nioBuffer, handle, reqCapacity, threadCache, threadLocal);
        } else {
            int maxLength = runSize(pageShifts, handle);
            buf.init(this, nioBuffer, handle, runOffset(handle) << pageShifts,
                    reqCapacity, maxLength, arena.parent.threadCache(), threadLocal);
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does initBuf() do?
initBuf() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/PoolChunk.java.
Where is initBuf() defined?
initBuf() is defined in buffer/src/main/java/io/netty/buffer/PoolChunk.java at line 606.
What does initBuf() call?
initBuf() calls 4 function(s): initBufWithSubpage, isSubpage, runOffset, runSize.
What calls initBuf()?
initBuf() is called by 1 function(s): allocate.

Analyze Your Own Codebase

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

Try Supermodel Free