#allocator #Hoard

nightly alloc_hoard

use Hoard as rust’s allocator

3 releases (breaking)

Uses old Rust 2015

0.3.0 Nov 6, 2017
0.2.0 Jun 24, 2016
0.1.0 Jan 25, 2016

#72 in #allocator

24 downloads per month


3.5K SLoC

C++ 3.5K SLoC // 0.2% comments C 327 SLoC // 0.1% comments Rust 119 SLoC // 0.2% comments Shell 7 SLoC

liballoc_hoard - Use Hoard as rust's allocator

This library allows users to use Hoard instead of either jemalloc or libc's malloc when building rust binaries and shared libraries.

Additional crate information is available here, and the idea behind this library is the Custom Allocotors section of the Rust book.


Simply add

alloc_hoard = "0.3"

To the dependencies of your crate in a project's Cargo.toml file, and then in a library or program add:

extern crate alloc_hoard;

To use Hoard for to satisfy all allocations for both the rust runtime and your program/library.


The code in this repository is derived from liballoc_jemalloc and liballoc_system from the rust repository, and as such falls under either the MIT or Apache v2 licenses. Hoard itself is licensed under the GPLv2, so that also applies when linking against liballoc_hoard.