7个版本

0.1.7 2020年8月11日
0.1.6 2020年7月2日
0.1.4 2019年11月3日

#243 in 内存管理


numanji 中使用

Apache-2.0/MIT

225KB
5K SLoC

分配器套件

这个crate主要是对context-allocator crate的重新编写。它包含更好的NUMA感知全局分配器,具有卫生宏。包含更好的可能性路径和更快的执行路径。

使用方法

#![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)
);

依赖项

~88KB