"Compacting the Uncompactable" by Bobby Powers
What it is
Bobby Powers presents Mesh, a drop-in malloc replacement that eliminates memory fragmentation in unmodified C/C++ programs by compacting memory. The talk covers how it works despite C's fixed object addresses, and its benefits for programs like Redis.
Why Hacker News recommends it
Recommended as a great talk on solving fragmentation for C/C++ and runtimes like Ruby and Python without code changes.
- 3 people recommended it
- 3 different months
- 0 strong recommendations
- first 2020, last 2025
What HN commenters said
“how to make a malloc() and free() that perform compaction”
Talk on a malloc that compacts memory to return it to the OS.
remexre, 2020-12 · Recommendation · in “How the Python object system works”
“There was a great talk at Strange Loop about a drop-in malloc replacement which compacts.”
Drop-in compacting malloc replacement that improved memory use in projects like Redis.
rtfeldman, 2022-07 · Recommendation · in “Reference count, don't garbage collect”
“also a good presentation about it on youtube.”
Presentation on merging sparse memory pages, a kind of garbage collection for C/C++.
superjan, 2025-01 · Recommendation · in “Using black magic to make a fast circular buffer (2017)”
Excerpts from Hacker News comments, linked to the originals. Summaries and labels were written by a language model from those comments.
Topics: malloc, memory fragmentation, compaction, mesh, c++
Also recommended by the same people
talk"A (Not So Gentle) Introduction To Systems Programming In ATS" by Aditya SiramStrange Loop Conference · 4 HN recommenders · 2017–2022
talkCppCon 2015: Andrei Alexandrescu “std::allocator...”CppCon · 7 HN recommenders · 2017–2025
talkLexical Scanning in Go - Rob PikeGoogleFOSSSydney · 13 HN recommenders · 2012–2025
talkCppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”CppCon · 9 HN recommenders · 2018–2026
talkRustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine WestRust Programming Language · 9 HN recommenders · 2018–2023
talkCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”CppCon · 13 HN recommenders · 2016–2024
talkIdeas about a new programming language for games.Jonathan Blow · 7 HN recommenders · 2014–2025
talkCppCon 2014: Mike Acton "Data-Oriented Design and C++"CppCon · 9 HN recommenders · 2015–2026