pub struct Arena { /* private fields */ }Expand description
A fixed-size memory pool backing every IREE allocation. Built over a static
byte buffer the caller provides; IREE’s runtime allocates and frees objects
inside it through a talc allocator, so it behaves like a heap of a
compile-time-constant size.
Implementations§
Source§impl Arena
impl Arena
Sourcepub fn new(buffer: &'static mut [u8]) -> Self
pub fn new(buffer: &'static mut [u8]) -> Self
Build an arena over buffer. The arena (and every IREE object created
with it) must not outlive the buffer; 'static enforces that here.
Sourcepub fn as_iree_allocator(&self) -> iree_allocator_t
pub fn as_iree_allocator(&self) -> iree_allocator_t
An iree_allocator_t backed by this arena. The arena must outlive it.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Arena
impl !RefUnwindSafe for Arena
impl Unpin for Arena
impl UnsafeUnpin for Arena
impl UnwindSafe for Arena
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more