Allocators in Rust
Clone or download

README.md

Allocators in Rust

Build Status Build status

Looking for elfmalloc in particular? It's here.

This repository encompasses a number of different crates. Some are general memory allocators, some are object allocators (allocators which allocate a specific type of object), and some are utility crates providing various features needed to implement these allocators.

The info directory contains more detailed information, including performance measurements. Aside from info, all top-level directories are Rust crates. More detailed information on each crate can be found in the crate's README.md.

Allocator crates

Crate Description
elfmalloc A general-purpose multi-threaded allocator providing both Rust Alloc and C malloc APIs
slab-alloc An object-specific slab allocator in the same tradition as the original slab allocator by Jeff Bonwick
bsalloc A simple general-purpose "bootstrapping" allocator used in the implementation of other allocators
mmap-alloc An Alloc API which is a thin wrapper around mmap (on Unix) or VirtualAlloc (on Windows)

Utility crates

Crate Description
alloc-fmt Allocation-safe formatting and debugging macros
alloc-tls Allocation-safe thread-local storage
bagpipe Fast, concurrent data structures including queues and a weakly-ordered bag data structure (design)
malloc-bind Bindings to allow a Rust Alloc to implement the C malloc API
object-alloc Traits representing type-specific variants of the Alloc trait
object-alloc-test A correctness test suite for object allocator implementations (uses the traits defined in object-alloc)

Contributing

Interested in contributing? We'd love to have you! Check out CONTRIBUTING.md.

Copyright and license

Copyrights in this project are retained by their contributors. No copyright assignment is required to contribute to this project. For a list of authors, see this repository's version control history.

This project is dual-licensed under the Apache 2.0 license or the MIT license at your option. Copies of these licenses can be found in the LICENSE-APACHE and LICENSE-MIT files respectively.