Home / Function/ initBufWithSubpage() — netty Function Reference

initBufWithSubpage() — netty Function Reference

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

Function java Buffer Telemetry calls 2 called by 2

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/PoolChunk.java lines 617–628

    void initBufWithSubpage(PooledByteBuf<T> buf, ByteBuffer nioBuffer, long handle, int reqCapacity,
                            PoolThreadCache threadCache, boolean threadLocal) {
        int runOffset = runOffset(handle);
        int bitmapIdx = bitmapIdx(handle);

        PoolSubpage<T> s = subpages[runOffset];
        assert s.isDoNotDestroy();
        assert reqCapacity <= s.elemSize : reqCapacity + "<=" + s.elemSize;

        int offset = (runOffset << pageShifts) + bitmapIdx * s.elemSize;
        buf.init(this, nioBuffer, handle, offset, reqCapacity, s.elemSize, threadCache, threadLocal);
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free