Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.emory.mathcs.util.allocator
Class BufferPool  view BufferPool download BufferPool.java

java.lang.Object
  extended byedu.emory.mathcs.util.allocator.BufferPool

class BufferPool
extends java.lang.Object

Memory pool used by PoolingAllocator.

Version:
1.0

Field Summary
private  edu.emory.mathcs.util.Queue[] pool
           
 
Constructor Summary
BufferPool()
           
 
Method Summary
 byte[] get(int desiredsize, boolean clear)
           
private  byte[] getFromQueue(edu.emory.mathcs.util.Queue q)
           
private static int getSlot(int num)
           
static int log(int n)
           
static int nextPowerOfTwo(int n)
           
 void reclaim(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pool

private final edu.emory.mathcs.util.Queue[] pool
Constructor Detail

BufferPool

public BufferPool()
Method Detail

get

public byte[] get(int desiredsize,
                  boolean clear)

getFromQueue

private byte[] getFromQueue(edu.emory.mathcs.util.Queue q)

reclaim

public void reclaim(byte[] data)

getSlot

private static int getSlot(int num)

log

public static int log(int n)

nextPowerOfTwo

public static int nextPowerOfTwo(int n)