An Allocator for arcon.
The allocator is not meant to handle all heap allocations during the execution. However, it is intended to be used to manage memory for different sections of the runtime. This includes message buffers, network buffers, and state indexes.
Creates a new Allocator with the given memory limit size
pub unsafe fn alloc<T>(&mut self, capacity: usize) -> AllocResult[src]
Allocate memory block of type T with given capacity
It is up to the caller to ensure
dealloc with the generated AllocId
Deallocate memory through the given AllocId
It is up to the caller to ensure that the given AllocId is active
pub fn allocated_bytes(&self) -> usize[src]
Returns amount of bytes that are currently allocated
pub fn total_allocations(&self) -> u128[src]
Returns total allocations made so far
pub fn bytes_remaining(&self) -> usize[src]
Returns how much bytes are available to allocate
impl RefUnwindSafe for Allocator[src]
impl UnwindSafe for Allocator[src]
type Error = Infallible
The type returned in the event of a conversion error.