org.apache.directmemory.memory.allocator.Allocator |
Known Indirect Subclasses |
Interface defining interaction with MemoryBuffer
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 interface
java.io.Closeable
|
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
|
---|