public final class SimpleAllocator extends Object implements Allocator, BuddyAllocatorMXBean
Allocator.AllocatorOutOfMemoryException
Constructor and Description |
---|
SimpleAllocator(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
allocateMultiple(MemoryBuffer[] dest,
int size)
Allocates multiple buffers of a given size.
|
LlapDataBuffer |
createUnallocated()
Creates an unallocated memory buffer object.
|
void |
deallocate(MemoryBuffer buffer)
Deallocates a memory buffer.
|
int |
getArenaSize()
Gets the arena size.
|
boolean |
getIsDirect()
Gets if bytebuffers are allocated directly offheap.
|
int |
getMaxAllocation()
Maximum allocation size supported by this allocator.
|
long |
getMaxCacheSize()
Gets the maximum cache size.
|
int |
getMinAllocation()
Gets minimum allocation size of allocator.
|
boolean |
isDirectAlloc()
Whether the allocator uses direct buffers.
|
public SimpleAllocator(org.apache.hadoop.conf.Configuration conf)
public void allocateMultiple(MemoryBuffer[] dest, int size)
Allocator
allocateMultiple
in interface Allocator
dest
- Array where buffers are placed. Objects are reused if already there
(see createUnallocated), created otherwise.size
- Allocation size.public void deallocate(MemoryBuffer buffer)
Allocator
deallocate
in interface Allocator
public boolean isDirectAlloc()
Allocator
isDirectAlloc
in interface Allocator
public LlapDataBuffer createUnallocated()
Allocator
createUnallocated
in interface Allocator
public boolean getIsDirect()
BuddyAllocatorMXBean
getIsDirect
in interface BuddyAllocatorMXBean
public int getMinAllocation()
BuddyAllocatorMXBean
getMinAllocation
in interface BuddyAllocatorMXBean
public int getMaxAllocation()
Allocator
getMaxAllocation
in interface Allocator
getMaxAllocation
in interface BuddyAllocatorMXBean
public int getArenaSize()
BuddyAllocatorMXBean
getArenaSize
in interface BuddyAllocatorMXBean
public long getMaxCacheSize()
BuddyAllocatorMXBean
getMaxCacheSize
in interface BuddyAllocatorMXBean
Copyright © 2016 The Apache Software Foundation. All rights reserved.