PoolSubpage.java — netty Source File
Architecture documentation for PoolSubpage.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer;
import java.util.concurrent.locks.ReentrantLock;
import static io.netty.buffer.PoolChunk.RUN_OFFSET_SHIFT;
import static io.netty.buffer.PoolChunk.SIZE_SHIFT;
import static io.netty.buffer.PoolChunk.IS_USED_SHIFT;
import static io.netty.buffer.PoolChunk.IS_SUBPAGE_SHIFT;
final class PoolSubpage<T> implements PoolSubpageMetric {
final PoolChunk<T> chunk;
final int elemSize;
private final int pageShifts;
private final int runOffset;
private final int runSize;
private final long[] bitmap;
private final int bitmapLength;
private final int maxNumElems;
final int headIndex;
PoolSubpage<T> prev;
PoolSubpage<T> next;
boolean doNotDestroy;
private int nextAvail;
private int numAvail;
final ReentrantLock lock;
// TODO: Test if adding padding helps under contention
//private long pad0, pad1, pad2, pad3, pad4, pad5, pad6, pad7;
/** Special constructor that creates a linked list head */
PoolSubpage(int headIndex) {
chunk = null;
lock = new ReentrantLock();
pageShifts = -1;
runOffset = -1;
elemSize = -1;
runSize = -1;
bitmap = null;
bitmapLength = -1;
maxNumElems = 0;
// ... (241 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does PoolSubpage.java do?
PoolSubpage.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Telemetry subdomain.
Where is PoolSubpage.java in the architecture?
PoolSubpage.java is located at buffer/src/main/java/io/netty/buffer/PoolSubpage.java (domain: Buffer, subdomain: Telemetry, directory: buffer/src/main/java/io/netty/buffer).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free