Struct light_arena::Allocator [] [src]

pub struct Allocator<'a> { /* fields omitted */ }

The allocator provides exclusive access to the memory arena, allowing for allocation of objects in the arena.

Objects allocated by an allocated cannot outlive it, upon destruction of the allocator the memory space it requested will be made available again. Drops of allocated objects are not called, only types which are Sized + Copy can be safely stored.

Methods

impl<'a> Allocator<'a>
[src]

[src]

Get a dynamically sized slice of data from the allocator. The contents of the slice will be unintialized.

Trait Implementations

impl<'a, 'b, T: 'a + Sized + Copy> Placer<T> for &'a Allocator<'b>
[src]

🔬 This is a nightly-only experimental API. (placement_new_protocol)

Place is the intermediate agent guarding the uninitialized state for Data. Read more

[src]

🔬 This is a nightly-only experimental API. (placement_new_protocol)

Creates a fresh place from self.

impl<'a> Drop for Allocator<'a>
[src]

[src]

Upon dropping the allocator we mark all the blocks in the arena as empty again, "releasing" our allocations.