#allocator #memory #memory-management #mmap #numa

nightly allocator-suite

Allocator Suite for various allocation types

4 releases

✓ Uses Rust 2018 edition

0.1.4 Nov 3, 2019
0.1.3 Nov 3, 2019
0.1.2 Nov 3, 2019
0.1.1 Nov 2, 2019

#39 in Memory management

Download history 252/week @ 2019-11-01 24/week @ 2019-11-08 16/week @ 2019-11-15 10/week @ 2019-11-22 14/week @ 2019-11-29 33/week @ 2019-12-06 45/week @ 2019-12-13 1/week @ 2019-12-20 7/week @ 2019-12-27 12/week @ 2020-01-03 9/week @ 2020-01-10 11/week @ 2020-01-17 3/week @ 2020-01-24 7/week @ 2020-01-31 7/week @ 2020-02-07

131 downloads per month
Used in 3 crates (2 directly)

Apache-2.0/MIT

230KB
5.5K SLoC

Allocator Suite

This crate is mostly rewritten version of context-allocator crate. It contains better NUMA-aware global allocator with hygienic macros. Contains better likelihood paths and faster execution paths.

Usage

#![feature(allocator_api)]
#![feature(extern_types)]
#![feature(core_intrinsics)]
#![feature(libstd_sys_internals)]
#![feature(thread_local)]
#![feature(const_fn)]

// Allocator generator macro
use allocator_suite::switchable_allocator;

// General imports
use allocator_suite::adaptors::prelude::*;
use std::alloc::System;

switchable_allocator!(
    application_allocator,
    BumpAllocator<ArenaMemorySource<MemoryMapSource>>,
    MultipleBinarySearchTreeAllocator<MemoryMapSource>,
    GlobalAllocToAllocatorAdaptor<System>,
    GlobalAllocToAllocatorAdaptor(System)
);

Dependencies

~235KB