public interface MemoryAllocator
| Modifier and Type | Method and Description |
|---|---|
Optional<ResourceHolder<org.apache.datasketches.memory.WritableMemory>> |
allocate(long size)
Allocates a block of memory of capacity .
|
long |
available()
Returns the number of bytes available for allocations.
|
long |
capacity()
Returns the number of bytes managed by this allocator.
|
Optional<ResourceHolder<org.apache.datasketches.memory.WritableMemory>> allocate(long size)
ResourceHolder.
The returned WritableMemory object will use little-endian byte order.long available()
Long.MAX_VALUE if there is no inherent limit. This generally does not mean you can actually
allocate 9 exabytes.long capacity()
available().
May return Long.MAX_VALUE if there is no inherent limit. This generally does not mean you can actually
allocate 9 exabytes.Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.