#allocation #api-bindings

shalloc

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

3 releases

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

#372 in Memory management

Download history 93/week @ 2024-09-01 22/week @ 2024-09-08 27/week @ 2024-09-15 10/week @ 2024-09-22 333/week @ 2024-09-29 48/week @ 2024-10-06 6/week @ 2024-10-13

94 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–2.1MB
~43K SLoC