frusa

Fast RUst System Allocator

What is it?

Another implementation of core::alloc::GlobalAlloc (Rust)

Why?

A system allocator should be reasonably fast, should be able to request more memory, and allow memory reclaim. I needed one at the beginning of 2023, and at this time none of the allocators I could find on crates.io matched the requirements.

Goals

Non goals

So is it fast? Ready to use?

A simple benchmark

``` $ cargo test --release concurrentspeedtest -- --nocapture

[...]

------- FRUSA Allocator --------------- concurrent speed test: 1 threads: 38.85 ns per alloc/dealloc; throughput: 25.74 ops/usec concurrent speed test: 2 threads: 119.54 ns per alloc/dealloc; throughput: 16.73 ops/usec concurrent speed test: 4 threads: 234.18 ns per alloc/dealloc; throughput: 17.08 ops/usec concurrent speed test: 8 threads: 465.11 ns per alloc/dealloc; throughput: 17.20 ops/usec

------- Rust System Allocator ---------- concurrent speed test: 1 threads: 11.92 ns per alloc/dealloc; throughput: 83.90 ops/usec concurrent speed test: 2 threads: 12.01 ns per alloc/dealloc; throughput: 166.49 ops/usec concurrent speed test: 4 threads: 14.18 ns per alloc/dealloc; throughput: 282.07 ops/usec concurrent speed test: 8 threads: 18.74 ns per alloc/dealloc; throughput: 427.00 ops/usec

```