“Lightweight Object Persistence With Relocatable Heaps in Modern C++"
summary
Shows a concrete implementation that uses C++11/14 allocator and pointer_traits to build a relocatable heap backed by segmented storage and a backbone array, storing std::string, std::list and std::map directly in shared or private memory. Implements synthetic pointers (segment+offset) and an allocator wrapper, serializes segments with simple binary IO (memcpy each segment to disk or to a shadow segment and then swap-buffers), preserves class invariants for POD-like relocatable types only, tests on clang and MSVC2015 U3, demo works though dereference cost rises and allocation is a simple leaky allocator.
AI-written summary · about
chapters (9)
- 0:00Introduction and overview
- 1:50Problem and motivation
- 12:29Relocatable heap concept
- 17:47Structural management concepts
- 25:14C++11 allocator improvements
- 30:15Code walkthrough and types
- 45:54Practical example and demo
- 53:40Conclusions and applications
- 55:51Q&A session
related talks
01h 02mFancy Pointers for Fun and Profit
01h 01mAllocators: The Good Parts
06mLightning Talk: Speeding up code with C++17 Polymorphic Memory Resources
01h 04mHow to Write a Custom Allocator
49mMost Malleable Memory Management Method in C++
01h 11mDynamic Memory Allocation Challenges in C++ Safety Critical Systems
01h 08mC++ and Persistent Memory Technologies, Like Intel's 3D-XPoint
01h 01mGetting Allocators out of Our Way
