Class UnsafeMemoryProvider
java.lang.Object
org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider
- All Implemented Interfaces:
DirectMemoryProvider
Memory provider implementation based on unsafe memory access.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocateMemory(long size) Allocates memory region of the specified size.voidfreeMemory(DirectMemoryRegion region) Releases allocated memory region.
-
Constructor Details
-
UnsafeMemoryProvider
public UnsafeMemoryProvider()
-
-
Method Details
-
allocateMemory
Description copied from interface:DirectMemoryProviderAllocates memory region of the specified size.- Specified by:
allocateMemoryin interfaceDirectMemoryProvider- Parameters:
size- size in bytes- Returns:
- the allocated region, never
null
-
freeMemory
Description copied from interface:DirectMemoryProviderReleases allocated memory region. The region must be allocated by this provider and must not be yet deallocated.- Specified by:
freeMemoryin interfaceDirectMemoryProvider- Parameters:
region- the region to release, cannot benull
-