pooledBufferAllocation() — netty Function Reference
Architecture documentation for the pooledBufferAllocation() function in NettyBlockHoundIntegrationTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD ed35428e_1bdf_5f4a_2418_d461c133a509["pooledBufferAllocation()"] 746a8721_66e8_40dd_5dc1_a4c697fa84e4["NettyBlockHoundIntegrationTest"] ed35428e_1bdf_5f4a_2418_d461c133a509 -->|defined in| 746a8721_66e8_40dd_5dc1_a4c697fa84e4 style ed35428e_1bdf_5f4a_2418_d461c133a509 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java lines 367–395
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
public void pooledBufferAllocation() throws Exception {
AtomicLong iterationCounter = new AtomicLong();
PooledByteBufAllocator allocator = PooledByteBufAllocator.DEFAULT;
FutureTask<Void> task = new FutureTask<>(() -> {
List<ByteBuf> buffers = new ArrayList<>();
long count;
do {
count = iterationCounter.get();
} while (count == 0);
for (int i = 0; i < 13; i++) {
int size = 8 << i;
buffers.add(allocator.ioBuffer(size, size));
}
for (ByteBuf buffer : buffers) {
buffer.release();
}
return null;
});
FastThreadLocalThread thread = new FastThreadLocalThread(task);
thread.start();
do {
allocator.dumpStats(); // This will take internal pool locks and we'll race with the thread.
iterationCounter.set(1);
} while (thread.isAlive());
thread.join();
task.get();
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does pooledBufferAllocation() do?
pooledBufferAllocation() is a function in the netty codebase, defined in transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java.
Where is pooledBufferAllocation() defined?
pooledBufferAllocation() is defined in transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java at line 367.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free