pub struct BuddyAllocator { /* private fields */ }Use jemalloc feature instead. See buddy_allocator module docs for migration.
Expand description
Multi-pool buddy allocator
Implementationsยง
Sourceยงimpl BuddyAllocator
impl BuddyAllocator
Sourcepub fn new() -> Self
๐Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn new() -> Self
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Create a new buddy allocator with default settings
Sourcepub fn with_pool_size(pool_size: usize) -> Self
๐Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn with_pool_size(pool_size: usize) -> Self
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Create a new buddy allocator with the specified default pool size
Sourcepub fn add_pool(&self, size: usize) -> Result<usize, BuddyError>
๐Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn add_pool(&self, size: usize) -> Result<usize, BuddyError>
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Add a new memory pool
Sourcepub fn allocate(&self, size: 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) -> Result<usize, BuddyError>
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Allocate memory
Sourcepub fn deallocate(&self, addr: usize) -> Result<(), BuddyError>
๐Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn deallocate(&self, addr: usize) -> Result<(), BuddyError>
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Deallocate memory
Sourcepub fn stats(&self) -> &BuddyStats
๐Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn stats(&self) -> &BuddyStats
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Get global statistics
Sourcepub fn total_free_bytes(&self) -> usize
๐Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn total_free_bytes(&self) -> usize
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Get total free bytes across all pools
Sourcepub fn pool_count(&self) -> usize
๐Deprecated since 0.2.0: Use jemalloc feature instead. See buddy_allocator module docs for migration.
pub fn pool_count(&self) -> usize
Use jemalloc feature instead. See buddy_allocator module docs for migration.
Get number of pools