Struct aren_alloc::Allocator
[−]
[src]
pub struct Allocator { /* fields omitted */ }
Allows allocation
Methods
impl Allocator
[src]
fn new() -> Allocator
[src]
Construct a new allocator with default page capacity.
fn with_capacity(cap: usize) -> Allocator
[src]
Construct a new allocator with cap
acity per inner page
fn alloc<T: Copy>(&self, elem: T) -> Pointer<T>
[src]
Allocate an instance of T
with value elem
,
return the allocated pointer.
size_of::<T>()
should be le to 256 bytes.
fn alloc_default<T: Copy + Default>(&self) -> Pointer<T>
[src]
Allocate an instance of T
with default value,
return the allocated pointer.
size_of::<T>()
should be le to 256 bytes.