Skip to content

About

何なのよ,𝒘𝒊(𝒍)𝒅-𝒔𝒄𝒓𝒆𝒆𝒏 𝗮𝗹𝗹𝗼𝗰 って

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wild-screen-alloc

Rust
A hobby slab allocator for bare-metal rust.

Usage

Create a static allocator in your root module:

use wild_screen_alloc::WildScreenAlloc;

#[global_allocator]
static mut ALLOCATOR: WildScreenAlloc = WildScreenAlloc::empty();

Before using this allocator, you need to init it:

fn init_allocator() {
    // Initialize global allocator
    let heap_addr: usize = /* calc heap addr */;
    let heap_size: usize = /* calc heap size */;
    unsafe {
        ALLOCATOR.init(heap_addr, heap_size);
    }
}

See example/ for more details.

Reference

License

This crate is licensed under MIT.
See LICENSE for details.

About

何なのよ,𝒘𝒊(𝒍)𝒅-𝒔𝒄𝒓𝒆𝒆𝒏 𝗮𝗹𝗹𝗼𝗰 って

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from Alignof/rust_template