Package org.apache.ignite.internal.mem
Interface DirectMemoryProvider
- All Known Implementing Classes:
UnsafeMemoryProvider
public interface DirectMemoryProvider
Direct memory provider interface.
Implementations must be thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionallocateMemory(long size) Allocates memory region of the specified size.voidfreeMemory(DirectMemoryRegion region) Releases allocated memory region.
-
Method Details
-
allocateMemory
Allocates memory region of the specified size.- Parameters:
size- size in bytes- Returns:
- the allocated region, never
null - Throws:
IgniteException- if allocation fails
-
freeMemory
Releases allocated memory region. The region must be allocated by this provider and must not be yet deallocated.- Parameters:
region- the region to release, cannot benull
-