Pool allocator in C++23 for simulations / game engines - faster than std::pmr
github.com·3h·
Discuss: r/programming
Flag this post

metapool

** lightweight, cache-friendly pool allocator with compile-time configurable layout **

🕳️ Packed memory grid inside L1/L2 cache for simulation workloads

🪦 Header-only - no external dependencies; include mtp_memory.hpp to start

🧬 std::allocator adapter for direct use with standard templates

🌀 Up to ~1300x faster than malloc, ~3.5x faster than heap-free PMR pool

🧿 Allocation trace tools to log and visualize memory usage

🔳 introduction

metapool is a lightweight, high-performance memory allocator with compile-time layout configuration and preallocated thread-local arenas, written in C++23 for a game engine.

Unlike general-purpose allocators, it uses a pool-style layout tailored to expected allocation patterns. This repository includes native containers …

Similar Posts

Loading similar posts...