#allocator #hoard #malloc

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

#681 in Memory management

29 downloads per month

GPL-2.0/GPL-3.0/Apache-2.0/MIT

285KB
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 Bitbake 4 SLoC

Contains (Mach-o exe, 10KB) Hoard/src/Heap-Layers/utility/a.out

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.

Usage

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.

Licensing

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.

Dependencies