| java.lang.Object | |
| ↳ | org.apache.directmemory.memory.allocator.LazyUnsafeAllocator |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Allocates and returns a
MemoryBuffer with capacity() set to the given size. | |||||||||||
Clear all allocated
MemoryBuffer, resulting in a empty and ready to deserve Allocator
| |||||||||||
Returns the given
MemoryBuffer making it available for a future usage. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
org.apache.directmemory.memory.allocator.Allocator
| |||||||||||
Allocates and returns a MemoryBuffer with capacity() set to the given size.
When the allocation fails, it returns either null or throws an BufferOverflowException, depending on the implementation.
| size | : the size in byte to allocate |
|---|
MemoryBuffer of the given size, or either return null or throw an BufferOverflowException when the allocation fails.
Clear all allocated MemoryBuffer, resulting in a empty and ready to deserve Allocator
Returns the given MemoryBuffer making it available for a future usage. Returning twice a MemoryBuffer won't throw an exception.
| memoryBuffer | : the MemoryBuffer to return
|
|---|