An open API service indexing awesome lists of open source software.

https://github.com/unrays/unsynchronized-chunk-allocator

A C++ unsynchronized chunk-based memory allocator with monotonic allocation strategy for high-performance workloads.
https://github.com/unrays/unsynchronized-chunk-allocator

allocator arena-allocator cache-friendly compiler-backend cpp cpp-library custom-allocator data-structures high-performance low-level-programming memory-allocator memory-management memory-pool monotonic-allocator performance pmr quebec systems-programming zero-overhead

Last synced: about 5 hours ago
JSON representation

A C++ unsynchronized chunk-based memory allocator with monotonic allocation strategy for high-performance workloads.

Awesome Lists containing this project

README

          

# Unsynchronized Chunk Allocator

A C++ unsynchronized chunk-based memory allocator with monotonic allocation strategy for high-performance workloads. This project is part of the **EXOTIC::memory** library.

## Overview

This project started as a technical challenge I set for myself within the scope of a compiler-related work.

It required a solid understanding of allocators, as they form the foundation of precise lifetime management and efficient data structures in low-level systems.

To approach this, I studied the design of `std::pmr` and related allocator models, taking notes and extracting the core ideas that I found most relevant.

It took me around three weeks to arrive at a functional implementation.

This is not a simple copy of an existing allocator from the internet. While I drew inspiration from established standards and allocator design principles, I implemented the system in a very educational and deliberate way, focusing on clarity and understanding.

I’m genuinely proud of this work, and it will be used as part of a compiler project where it fulfills its original goal.

---

## Example Usage

```cpp
// In this case, we use a monotonic atomic buffer as the memory backend
exotic::memory::monotonic_atomic_buffer upstream(1 << 20);

exotic::memory::unsynchronized_chunk_allocator allocator(&upstream);

// Allocate raw memory for 10 ints
int* data = allocator.allocate(10);

// Construct objects in-place
allocator.construct(data, 42);

// High-level allocation helper
auto* obj = allocator.new_object(123);

// Destroy (no-op deallocation model)
allocator.destroy(obj);
```

---

## Notes

This project is intentionally minimal in scope and focused on learning and system-level understanding rather than being a production-ready general-purpose allocator. This project is the result of the skills I have undoubtedly acquired over the past 7 months since I started learning C++. Also, the very library-like aspect with `exotic::memory` is simply because it looks cooler and more professional :)

## License

This project is licensed under the Boost Software License. See the [LICENSE](LICENSE) file for details.

© Félix-Olivier Dumas 2026