public class AllocationHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
allocate(ValueVector v,
int valueCount,
int bytesPerValue)
Allocates the vector.
|
static void |
allocate(ValueVector v,
int valueCount,
int bytesPerValue,
int repeatedPerTop)
Allocates memory for a vector assuming given number of values and their width.
|
static void |
allocateNew(ValueVector v,
int valueCount)
Allocates the exact amount if v is fixed width, otherwise falls back to dynamic allocation.
|
static void |
allocatePrecomputedChildCount(ValueVector v,
int valueCount,
int bytesPerValue,
int childValCount)
Allocates memory for a vector assuming given number of values and their width.
|
public static void allocate(ValueVector v, int valueCount, int bytesPerValue)
v - The vector to allocate.valueCount - Number of values to allocate.bytesPerValue - bytes per value.OutOfMemoryException - if it can't allocate the memory.public static void allocatePrecomputedChildCount(ValueVector v, int valueCount, int bytesPerValue, int childValCount)
v - The vector the allocate.valueCount - The number of elements to allocate.bytesPerValue - The bytes per value to use for allocating underlying storagechildValCount - If v is a repeated vector, this is number of child elements to allocate.OutOfMemoryException - if it can't allocate the memory.public static void allocate(ValueVector v, int valueCount, int bytesPerValue, int repeatedPerTop)
v - The vector the allocate.valueCount - The number of elements to allocate.bytesPerValue - The bytes per value to use for allocating underlying storagerepeatedPerTop - If v is a repeated vector, this is assumed number of elements per child.OutOfMemoryException - if it can't allocate the memorypublic static void allocateNew(ValueVector v, int valueCount)
v - value vector we are trying to allocatevalueCount - size we are trying to allocateOutOfMemoryException - if it can't allocate the memoryCopyright © 2024 The Apache Software Foundation. All rights reserved.