Home / Function/ adaptiveDirectAllocAndFree() — netty Function Reference

adaptiveDirectAllocAndFree() — netty Function Reference

Architecture documentation for the adaptiveDirectAllocAndFree() function in ByteBufAllocateAndGrowBenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  6f6a8961_fab9_3259_48b7_ba057361aea0["adaptiveDirectAllocAndFree()"]
  fc3b0965_3296_b97f_be0e_37f95bff98b5["ByteBufAllocateAndGrowBenchmark"]
  6f6a8961_fab9_3259_48b7_ba057361aea0 -->|defined in| fc3b0965_3296_b97f_be0e_37f95bff98b5
  0682dd35_0259_0d96_91dc_bd05b7e40d1b["expandBuffer()"]
  6f6a8961_fab9_3259_48b7_ba057361aea0 -->|calls| 0682dd35_0259_0d96_91dc_bd05b7e40d1b
  style 6f6a8961_fab9_3259_48b7_ba057361aea0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocateAndGrowBenchmark.java lines 84–94

    @Benchmark
    public void adaptiveDirectAllocAndFree(BufStats stats) {
        int idx = rand.nextInt(adaptiveDirectBuffers.length);
        ByteBuf oldBuf = adaptiveDirectBuffers[idx];
        if (oldBuf != null) {
            oldBuf.release();
        }
        ByteBuf buf = adaptiveAllocator.directBuffer();
        expandBuffer(buf, stats);
        adaptiveDirectBuffers[idx] = buf;
    }

Domain

Subdomains

Frequently Asked Questions

What does adaptiveDirectAllocAndFree() do?
adaptiveDirectAllocAndFree() is a function in the netty codebase, defined in microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocateAndGrowBenchmark.java.
Where is adaptiveDirectAllocAndFree() defined?
adaptiveDirectAllocAndFree() is defined in microbench/src/main/java/io/netty/microbench/buffer/ByteBufAllocateAndGrowBenchmark.java at line 84.
What does adaptiveDirectAllocAndFree() call?
adaptiveDirectAllocAndFree() calls 1 function(s): expandBuffer.

Analyze Your Own Codebase

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

Try Supermodel Free