Elsewhere Memory (C++20 Abstract Machine) + Virtual Memory
summary
C++20 currently lacks legal support for memory owned elsewhere, so dynamic allocators, mmaps and shared memory rely on undefined behaviour. Proposal adds detached_cast and attach/detach semantics: detaching ends object lifetime, uses a compiler-only fence (atomic_signal_fence) to force stores, reattaching does a memmove-to-self then reconstructs objects, enabling safe relocation and inter-process sharing between identical binaries. It teaches the abstract machine about pages (private/shared/clean) to match VM reality, cites ≈6,000 CPU-cycle page faults and PCIe ≈500 ns latency, and targets KV devices like Samsung KV-SSD.
AI-written summary · about
chapters (15)
- 0:00Intro
- 1:00Contents
- 5:15C++ 20 abstract machine
- 18:12Further reading
- 19:08Virtual Memory - Overview
- 23:01Virtual Memory - Private pages
- 24:51Virtual Memory - Files
- 27:19Virtual Memory - Swap file
- 29:38Elsewhere Memory - What is it?
- 34:21Elsewhere Memory - Accessing it
- 40:21Problem to solved
- 44:13Object attachment/detachment
- 47:28Detachment operations
- 55:39Attachment operations
- 58:20Reachable C++ programs 2/3
related talks
01h 11mDynamic Memory Allocation Challenges in C++ Safety Critical Systems
22mWhat we learned from C++ atomics and memory model standardization
27m“From security to performance to GPU programming..."
57m“An allocator model for std2”
01h 02m“Lightweight Object Persistence With Relocatable Heaps in Modern C++"
49mMost Malleable Memory Management Method in C++
19mStarMalloc: Verifying a Modern, Hardened Memory Allocator
01h 00mWhat did C++ do for Transactional Memory?
