#alloc #allocator #memory-allocator #memory #buddy

buddy-alloc

Buddy-alloc is a memory allocator for no-std Rust, used for embedded environments

3 unstable releases

0.4.1 Nov 14, 2020
0.4.0 Oct 2, 2020
0.3.0 Jun 14, 2020
0.2.0 Jan 27, 2020
0.1.2 Jan 15, 2020

#62 in Memory management

Download history 47/week @ 2020-09-30 33/week @ 2020-10-07 115/week @ 2020-10-14 153/week @ 2020-10-21 77/week @ 2020-10-28 75/week @ 2020-11-04 136/week @ 2020-11-11 209/week @ 2020-11-18 198/week @ 2020-11-25 203/week @ 2020-12-02 203/week @ 2020-12-09 164/week @ 2020-12-16 202/week @ 2020-12-23 231/week @ 2020-12-30 328/week @ 2021-01-06 225/week @ 2021-01-13

469 downloads per month
Used in 4 crates (3 directly)

MIT license

32KB
774 lines

Buddy-alloc

Crates.io

Buddy-alloc is a memory allocator for no-std Rust, used for embedded environments.

Usage

Check examples and Rust Doc.

  • This allocator is combined by a link-list based fast allocator and a buddy allocator.
  • No syscalls, we assume the execution environment has no MMU, you need to pre-allocate the memory range for heaps.
  • No threadsafe supports; you need to implement locks on your own.

Why

My original intention is to enable alloc crate for no-std Rust in CKB-VM without introducing LibC. I choose the buddy allocation algorithm since it's simple, stable, and efficient enough. This crate is designed to be used in general environment, it should be able to used in similar embedded environments.

License

MIT

No runtime deps