7 releases

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

#190 in Memory management

Download history 5/week @ 2022-11-25 10/week @ 2022-12-02 7/week @ 2022-12-09 7/week @ 2022-12-16 20/week @ 2022-12-23 6/week @ 2022-12-30 19/week @ 2023-01-06 4/week @ 2023-01-13 10/week @ 2023-01-20 16/week @ 2023-01-27 12/week @ 2023-02-03 27/week @ 2023-02-10 27/week @ 2023-02-17 6/week @ 2023-02-24 10/week @ 2023-03-03 18/week @ 2023-03-10

66 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