Home

Awesome

XenoAtom.Allocators ci NuGet

<img align="right" width="160px" height="160px" src="https://raw.githubusercontent.com/XenoAtom/XenoAtom.Allocators/main/img/XenoAtom.Allocators.png">

This library provides fast, lightweight and low-level memory allocators for .NET.

✨ Features

📖 User Guide

For more details on how to use XenoAtom.Allocators, please visit the user guide.

📊 Benchmarks

The benchmark is available in the XenoAtom.Allocators.Bench.

It is comparing the performance of the TLSF allocator against the standard malloc/free from the C runtime library.

The benchmark consists of making 2048 allocations and frees within a range of random sizes between 64, 96, 150, 200, 400, 1024, 4096 bytes.

BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3810/23H2/2023Update/SunValley3)
AMD Ryzen 9 7950X, 1 CPU, 32 logical and 16 physical cores
.NET SDK 8.0.300
  [Host]     : .NET 8.0.6 (8.0.624.26715), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  DefaultJob : .NET 8.0.6 (8.0.624.26715), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
MethodMeanErrorStdDevRatioRatioSD
Tlsf82.27 us1.285 us1.202 us0.780.02
Libc105.34 us1.898 us2.110 us1.000.00

The benchmark shows that the TLSF allocator is 20%+ faster than the standard malloc/free from the C runtime library (MSVC C Runtime on Windows).

🪪 License

This software is released under the BSD-2-Clause license.

🤗 Author

Alexandre Mutel aka XenoAtom.