3 unstable releases

new 0.3.4 Apr 2, 2026
0.1.4 Mar 6, 2026
0.1.4-pre.1 Jan 29, 2026

#282 in Memory management

Download history 173/week @ 2026-01-28 209/week @ 2026-02-04 3/week @ 2026-02-11 42/week @ 2026-02-18 20/week @ 2026-02-25 128/week @ 2026-03-04 130/week @ 2026-03-11 87/week @ 2026-03-18 19/week @ 2026-03-25

373 downloads per month
Used in 3 crates (via axdevice)

MIT/Apache

22KB
290 lines

range-alloc-arceos

Crates.io Docs License CI

range-alloc-arceos is a generic range allocator tailored for the ArceOS ecosystem.

It is a fork of the excellent gfx-rs/range-alloc, adapted for use in kernel development and embedded scenarios (no_std). It allows you to dynamically allocate and free ranges from a predefined memory block or address space.

Features

  • no_std Support: Designed for bare-metal and kernel environments.
  • Generic: Works with any type that satisfies the Range requirements (e.g., memory addresses, port numbers).
  • Efficient: Merges adjacent free ranges to minimize fragmentation.

Usage

Add this to your Cargo.toml:

[dependencies]
range-alloc-arceos = "0.1.0-alpha.1"

Example

use range_alloc_arceos::RangeAllocator;

fn main() {
    // Initialize the allocator with a range (e.g., 0..100)
    let mut allocator = RangeAllocator::new(0..100);

}

License

This project is licensed under either of

at your option.

No runtime deps