#allocation #api-bindings

shalloc

Implements the GlobalAlloc trait for supahero1’s allocator written in C: https://github.com/supahero1/alloc

3 releases

new 0.1.2 Oct 4, 2024
0.1.1 Sep 30, 2024
0.1.0 Sep 6, 2024

#416 in Memory management

Download history 106/week @ 2024-09-02 10/week @ 2024-09-09 27/week @ 2024-09-16 9/week @ 2024-09-23 344/week @ 2024-09-30

403 downloads per month

Apache-2.0

44KB
2K SLoC

C 2K SLoC // 0.0% comments Rust 69 SLoC // 0.0% comments

shalloc

This crate implements the GlobalAlloc trait for supahero1's allocator written in C. See the README in supahero1's repo for more details.

Usage

#[global_allocator]
static ALLOCATOR: shalloc::Shalloc = shalloc::Shalloc;

Benchmark

A benchmark is available at https://github.com/supahero1/alloc

No runtime deps

~0–2MB
~41K SLoC