public class MallocMT extends Malloc
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONCURRENCY_LEVEL |
| Constructor and Description |
|---|
MallocMT(long capacity) |
MallocMT(long capacity,
int concurrencyLevel) |
MallocMT(long base,
long capacity) |
MallocMT(long base,
long capacity,
int concurrencyLevel) |
MallocMT(MappedFile mmap) |
MallocMT(MappedFile mmap,
int concurrencyLevel) |
| Modifier and Type | Method and Description |
|---|---|
int |
allocatedSize(long address) |
void |
free(long address) |
long |
getFreeMemory() |
long |
malloc(int size) |
Malloc |
segment(int index) |
Malloc |
segmentFor(long n)
Deterministically get one of the segments by some
long value |
int |
segments() |
void |
verify()
Verify the layout of the heap.
|
base, calloc, getTotalMemory, getUsedMemorypublic static final int DEFAULT_CONCURRENCY_LEVEL
public MallocMT(long capacity,
int concurrencyLevel)
public MallocMT(long capacity)
public MallocMT(long base,
long capacity,
int concurrencyLevel)
public MallocMT(long base,
long capacity)
public MallocMT(MappedFile mmap, int concurrencyLevel)
public MallocMT(MappedFile mmap)
public int segments()
public Malloc segment(int index)
public Malloc segmentFor(long n)
long valuen - an index of the segment to returnMalloc instance for the specified segmentpublic long getFreeMemory()
getFreeMemory in interface MallocMXBeangetFreeMemory in class Mallocpublic long malloc(int size)
public void free(long address)
public int allocatedSize(long address)
allocatedSize in class Malloc