public class AllocInBlock
extends java.lang.Object
allocByteArray(Object, int)
etc.
are called with a parent. The parent is any Object, to which the array may associated.
The concept in C with blockHeap is: The Object uses a part of a block, the array should use
the free spaces in the same block. In Java it is not regarded.
IndexMultiTable
:
The size of one table depends on this system property. It uses the block heap optimal.
But the functionality of IndexMultiTable doesn't depend on it. Using less or greater tables
influences only the calculation time in less kind, not the algorithm itself.
Modifier and Type | Field and Description |
---|---|
static int |
checkGcBlockFreed |
static int |
checkGcBlockUsed |
static int |
checkGcFinished |
private static int |
defaultBlockUserSize
The used size for Java.
|
private static int |
exampleObjectSize
In C all methods to allocate arrays may called with an object which should use the same block.
|
Constructor and Description |
---|
AllocInBlock() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
allocByteArray(java.lang.Object parent,
int size) |
static char[] |
allocCharArray(java.lang.Object parent,
int size) |
static double[] |
allocDoubleArray(java.lang.Object parent,
int size) |
static float[] |
allocFloatArray(java.lang.Object parent,
int size) |
static int[] |
allocIntArray(java.lang.Object parent,
int size) |
static long[] |
allocLongArray(java.lang.Object parent,
int size) |
static java.lang.Object[] |
allocObjectArray(java.lang.Object parent,
int size) |
static short[] |
allocShortArray(java.lang.Object parent,
int size) |
static java.lang.StringBuffer |
allocStringBuffer(java.lang.Object parent,
int size) |
static int |
garbageCollection_BlockHeapJc(boolean bUserCall)
Organizes 1 step for garbage collection.
|
static int |
restSizeBlock(java.lang.Class<?> parent_type,
int sizeBlock)
Returns the rest of available bytes in the block, which contains parent.
|
static void |
setLogMessageOutput(LogMessage output,
int baseNumber) |
static void |
setRunModeAll()
Sets the run mode for all instances of BlockHeapJc.
|
static int |
sizeofPointer()
Returns the sizeof a pointer in the C implementation.
|
private static int defaultBlockUserSize
private static int exampleObjectSize
public static final int checkGcBlockUsed
public static final int checkGcBlockFreed
public static final int checkGcFinished
public static int restSizeBlock(java.lang.Class<?> parent_type, int sizeBlock)
parent
- The object which is allocated already in the block. If parent isn't allocated
in a block of BlockHeap, this method returns the amount of bytes in a new block.public static int sizeofPointer()
public static byte[] allocByteArray(java.lang.Object parent, int size)
public static char[] allocCharArray(java.lang.Object parent, int size)
public static java.lang.StringBuffer allocStringBuffer(java.lang.Object parent, int size)
public static int[] allocIntArray(java.lang.Object parent, int size)
public static short[] allocShortArray(java.lang.Object parent, int size)
public static long[] allocLongArray(java.lang.Object parent, int size)
public static float[] allocFloatArray(java.lang.Object parent, int size)
public static double[] allocDoubleArray(java.lang.Object parent, int size)
public static java.lang.Object[] allocObjectArray(java.lang.Object parent, int size)
public static void setRunModeAll()
public static void setLogMessageOutput(LogMessage output, int baseNumber)
public static int garbageCollection_BlockHeapJc(boolean bUserCall)
bUserCall
- false for the normal garbage collector call.