[][src]Crate alloc_compose

Test Status Coverage Status Docs master Docs.rs Crates.io Crates.io

Composable allocator structures for plugging together more powerful allocators.

alloc-compose relies on AllocRef as allocator trait. Until AllocRef has been stabilized, this crate requires a nightly compiler.

The design of composable allocators is inspired by std::allocator Is to Allocation what std::vector Is to Vexation by Andrei Alexandrescu and the Phobos Standard Library of the D Programming Language.

License

Alloc-Compose is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Modules

stats

Structures to collect allocator statistics.

Structs

Affix

Allocator which can add a prefix and a suffix to a requested memory block.

ChunkAlloc

Allocate memory with a multiple size of the provided chunk size.

FallbackAlloc

An allocator equivalent of an "or" operator in algebra.

MemoryMarker

Marks newly allocated and deallocated memory with a byte pattern.

NullAlloc

An emphatically empty implementation of AllocRef.

Proxy

Calls the provided callbacks when invoking methods on AllocRef.

Region

Allocator over an user-defined region of memory.

SegregateAlloc

Dispatches calls to AllocRef between two allocators depending on the size allocated.

Traits

CallbackRef

Backend for the Proxy allocator.

Owns

Trait to determine if a given MemoryBlock is owned by an allocator.