Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jjyr/buddy-alloc
Buddy-alloc is a memory allocator for no-std Rust, used for embedded environments.
https://github.com/jjyr/buddy-alloc
allocator embedded rust rust-no-std
Last synced: 6 days ago
JSON representation
Buddy-alloc is a memory allocator for no-std Rust, used for embedded environments.
- Host: GitHub
- URL: https://github.com/jjyr/buddy-alloc
- Owner: jjyr
- License: mit
- Created: 2020-01-04T01:19:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T02:46:23.000Z (28 days ago)
- Last Synced: 2024-10-24T19:17:57.529Z (27 days ago)
- Topics: allocator, embedded, rust, rust-no-std
- Language: Rust
- Homepage:
- Size: 80.1 KB
- Stars: 28
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
# Buddy-alloc
[![Crates.io](https://img.shields.io/crates/v/buddy-alloc.svg)](https://crates.io/crates/buddy-alloc)
[![Downloads](https://img.shields.io/crates/d/buddy-alloc?style=flat-square)](https://crates.io/crates/buddy-alloc)Buddy-alloc is a memory allocator for no-std Rust, used for embedded environments.
## Usage
Check [examples](https://github.com/jjyr/buddy-alloc/tree/master/examples) and [Rust Doc](https://docs.rs/buddy-alloc).
* 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