pub struct BuddyArena { /* private fields */ }👎Deprecated since 0.2.0:
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Expand description
Arena allocator using buddy allocator for backing storage
Implementations§
Source§impl BuddyArena
impl BuddyArena
Sourcepub fn new(block_size: usize) -> Self
👎Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn new(block_size: usize) -> Self
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Create a new arena with the specified block size
Sourcepub fn allocate(&self, size: usize, align: usize) -> Result<usize, BuddyError>
👎Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn allocate(&self, size: usize, align: usize) -> Result<usize, BuddyError>
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Allocate from the arena (bump allocation)
Sourcepub fn allocate_val<T>(&self, _val: T) -> Result<usize, BuddyError>
👎Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn allocate_val<T>(&self, _val: T) -> Result<usize, BuddyError>
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Allocate a value and return its address
Sourcepub fn reset(&self)
👎Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn reset(&self)
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Reset the arena (free all blocks)
Sourcepub fn allocated_size(&self) -> usize
👎Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn allocated_size(&self) -> usize
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Get total allocated size
Trait Implementations§
Source§impl Drop for BuddyArena
impl Drop for BuddyArena
Auto Trait Implementations§
impl !Freeze for BuddyArena
impl !RefUnwindSafe for BuddyArena
impl Send for BuddyArena
impl Sync for BuddyArena
impl Unpin for BuddyArena
impl UnsafeUnpin for BuddyArena
impl UnwindSafe for BuddyArena
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