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

nightly allocator-suite

Allocator Suite for various allocation types

7 releases

0.1.7 Aug 11, 2020
0.1.6 Jul 2, 2020
0.1.4 Nov 3, 2019

#124 in Memory management

Download history 9/week @ 2022-02-27 8/week @ 2022-03-06 26/week @ 2022-03-13 26/week @ 2022-03-20 5/week @ 2022-03-27 8/week @ 2022-04-03 10/week @ 2022-04-10 5/week @ 2022-04-17 23/week @ 2022-04-24 22/week @ 2022-05-01 59/week @ 2022-05-08 124/week @ 2022-05-15 35/week @ 2022-05-22 63/week @ 2022-05-29 62/week @ 2022-06-05 5/week @ 2022-06-12

166 downloads per month
Used in numanji

Apache-2.0/MIT

210KB
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