1个不稳定版本

使用旧的Rust 2015

0.1.0 2017年11月14日

#573内存管理

MIT/Apache

9KB
143

Rust Buddy内存分配器

Rust中伙伴分配算法的实现。

用法

extern crate rustbuddy;

// Create a new instance w/ n levels
let mut buddy = rustbuddy::BuddyAllocator::new(4);

// Allocate a single block (returns the index offset of the block)
let offset = buddy.allocate(1);

// Dump the tree for debugging
println!("{}", buddy.dump());

无运行时依赖