public class ODirectMemoryAllocator extends Object implements ODirectMemoryAllocatorMXBean
Constructor and Description |
---|
ODirectMemoryAllocator() |
Modifier and Type | Method and Description |
---|---|
OPointer |
allocate(int size,
int align,
boolean clear)
Allocates chunk of direct memory of given size.
|
void |
checkMemoryLeaks()
Verifies that all pointers which were allocated by allocator are freed.
|
void |
checkTrackedPointerLeaks()
Checks reference queue to find direct memory leaks
|
void |
deallocate(OPointer pointer)
Returns allocated direct memory back to OS
|
long |
getMemoryConsumption() |
static ODirectMemoryAllocator |
instance() |
public static ODirectMemoryAllocator instance()
public OPointer allocate(int size, int align, boolean clear)
size
- Amount of memory to allocateclear
- clears memory if neededODirectMemoryAllocationFailedException
- if it is impossible to allocate amount of direct
memory of given sizepublic void deallocate(OPointer pointer)
public long getMemoryConsumption()
getMemoryConsumption
in interface ODirectMemoryAllocatorMXBean
public void checkMemoryLeaks()
public void checkTrackedPointerLeaks()
Copyright © 2009–2020 OrientDB. All rights reserved.