Home / Function/ nextAvailableSegmentOffset() — netty Function Reference

nextAvailableSegmentOffset() — netty Function Reference

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

Function java Buffer Telemetry calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  1c99e4d1_eab5_0574_2be2_1d396456cf4d["nextAvailableSegmentOffset()"]
  0786b48a_6931_326c_822b_73a96aca1827["SizeClassedChunk"]
  1c99e4d1_eab5_0574_2be2_1d396456cf4d -->|defined in| 0786b48a_6931_326c_822b_73a96aca1827
  124af09c_056b_fca2_ab69_30a58e494d89["readInitInto()"]
  124af09c_056b_fca2_ab69_30a58e494d89 -->|calls| 1c99e4d1_eab5_0574_2be2_1d396456cf4d
  1fed9ab7_5a1d_51fc_3bb4_e5426c8fe9db["isEmpty()"]
  1c99e4d1_eab5_0574_2be2_1d396456cf4d -->|calls| 1fed9ab7_5a1d_51fc_3bb4_e5426c8fe9db
  790abbfa_ddb4_568c_92a2_77f827bf5498["pop()"]
  1c99e4d1_eab5_0574_2be2_1d396456cf4d -->|calls| 790abbfa_ddb4_568c_92a2_77f827bf5498
  style 1c99e4d1_eab5_0574_2be2_1d396456cf4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java lines 1297–1311

        private int nextAvailableSegmentOffset() {
            final int startIndex;
            IntStack localFreeList = this.localFreeList;
            if (localFreeList != null) {
                assert Thread.currentThread() == ownerThread;
                if (localFreeList.isEmpty()) {
                    startIndex = externalFreeList.poll();
                } else {
                    startIndex = localFreeList.pop();
                }
            } else {
                startIndex = externalFreeList.poll();
            }
            return startIndex;
        }

Domain

Subdomains

Called By

Frequently Asked Questions

What does nextAvailableSegmentOffset() do?
nextAvailableSegmentOffset() is a function in the netty codebase, defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java.
Where is nextAvailableSegmentOffset() defined?
nextAvailableSegmentOffset() is defined in buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java at line 1297.
What does nextAvailableSegmentOffset() call?
nextAvailableSegmentOffset() calls 2 function(s): isEmpty, pop.
What calls nextAvailableSegmentOffset()?
nextAvailableSegmentOffset() is called by 1 function(s): readInitInto.

Analyze Your Own Codebase

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

Try Supermodel Free