org.apache.cassandra.utils

## Class HeapAllocator

- java.lang.Object
- - org.apache.cassandra.utils.Allocator
  - - org.apache.cassandra.utils.HeapAllocator

    public final class HeapAllocator
    extends Allocator

### Field Summary

Fields
`static HeapAllocator` `instance`

### Constructor Summary

Constructors
Constructor and Description
`HeapAllocator()` Normally you should use HeapAllocator.instance, since there is no per-Allocator state.

### Method Summary

Methods
`java.nio.ByteBuffer` `allocate(int size)`
`long` `getMinimumSize()`

### Methods inherited from class org.apache.cassandra.utils.Allocator

`clone`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### instance

    public static final HeapAllocator instance

### Constructor Detail

#### HeapAllocator

    public HeapAllocator()

Normally you should use HeapAllocator.instance, since there is no per-Allocator state. This is exposed so that the reflection done by Memtable works when SlabAllocator is disabled.

### Method Detail

#### allocate

    public java.nio.ByteBuffer allocate(int size)

Specified by:
  `allocate` in class `Allocator`

#### getMinimumSize

    public long getMinimumSize()

Specified by:
  `getMinimumSize` in class `Allocator`