Tagged articles

custom allocator

4 articles · Page 1 of 1
Deepin Linux
Deepin Linux
Aug 20, 2026 · Fundamentals

Mastering C++ Allocators and PMR: Build Robust, High‑Performance Memory Management

The article explains why ordinary heap allocation can cause fragmentation and slowdown, introduces the C++ allocator interface and its allocate/deallocate functions, shows how to implement a custom stack‑based allocator, compares traditional allocators with C++17 polymorphic memory resources (PMR), and provides practical code examples, performance benchmarks, and best‑practice guidelines.

C++PMRPerformance
0 likes · 30 min read
Mastering C++ Allocators and PMR: Build Robust, High‑Performance Memory Management
Deepin Linux
Deepin Linux
Oct 6, 2025 · Fundamentals

Mastering Placement New in C++: When and How to Use It Safely

This article explains the concept, syntax, and practical use cases of C++ placement new, compares it with ordinary new, discusses memory‑pool and stack allocations, highlights alignment and lifetime management issues, and provides interview‑style Q&A with code examples.

C++Object ConstructionPerformance
0 likes · 35 min read
Mastering Placement New in C++: When and How to Use It Safely
Deepin Linux
Deepin Linux
Jun 30, 2025 · Fundamentals

Boost C++ Performance with Fixed-Size Memory Pools: Theory and Code

This article explains why frequent dynamic memory allocation can cause slowdown and fragmentation, introduces fixed-size memory pools as an efficient solution, details their core principles, data structures, key allocation and deallocation functions, and demonstrates their performance advantage with C++ code examples and benchmarks.

C++custom allocatorfixed-size allocation
0 likes · 20 min read
Boost C++ Performance with Fixed-Size Memory Pools: Theory and Code