#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

#55 in Memory management

Download history 5/week @ 2019-12-15 4/week @ 2019-12-22 3/week @ 2019-12-29 12/week @ 2020-01-05 12/week @ 2020-01-12 10/week @ 2020-01-19 4/week @ 2020-01-26 6/week @ 2020-02-02 6/week @ 2020-02-09 7/week @ 2020-02-16 23/week @ 2020-02-23 8/week @ 2020-03-01 12/week @ 2020-03-08 4/week @ 2020-03-15 21/week @ 2020-03-22 24/week @ 2020-03-29

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