CppCon 2019: Emery Berger “Mesh: Automatically Compacting Your C++ Application's Memory”
CppCon2 HN recommenders · recommended in 2 months, 2019-2023
15K views · 7 years ago · talk · evergreen
Emery Berger's CppCon 2019 talk introducing Mesh, a drop-in malloc replacement that compacts memory in unmodified C and C++ programs. It tackles fragmentation by merging pages without changing pointers.
HN recommends Berger's talks as fascinating and cites Mesh as mind-blowing memory allocator work.
40:18"Compacting the Uncompactable" by Bobby Powers
Strange Loop Conference
29K views • 7 years ago
1:04:26CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”
CppCon
40K views • 8 years ago
1:01:09Plenary: Performance Matters - Emery Berger - CppCon 2020
CppCon
32K views • 6 years ago
1:05:39The One-Decade Task: Putting std::atomic in CUDA. - Olivier Giroux - CppCon 2019
CppCon
11K views • 7 years ago
1:39:25CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”
CppCon
149K views • 10 years ago
1:29:54CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"
CppCon
188K views • 11 years ago
1:13:41CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"
CppCon
235K views • 12 years ago
55:49CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"
CppCon
119K views • 10 years ago
1:27:46CppCon 2014: Mike Acton "Data-Oriented Design and C++"
CppCon
862K views • 12 years ago
1:14:22CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”
CppCon
288K views • 9 years ago
1:12:27CppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
196K views • 11 years ago
1:33:022013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++
CppNow
34K views • 13 years ago
1:00:58CppCon 2017: Chandler Carruth “Going Nowhere Faster”
CppCon
113K views • 9 years ago
55:42CppCon 2019: Matt Godbolt “Path Tracing Three Ways: A Study of C++ Style”
CppCon
77K views • 7 years ago
1:04:00CppCon 2015: Sean Parent "Better Code: Data Structures"
CppCon
106K views • 11 years ago
59:58CppCon 2018: Nicolai Josuttis “The Nightmare of Initialization in C++”
CppCon
79K views • 8 years ago
1:04:33CppCon 2014: Jeff Preshing "How Ubisoft Develops Games for Multicore - Before and After C++11"
CppCon
53K views • 12 years ago
31:19CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"
CppCon
122K views • 10 years ago
1:19:52CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
264K views • 10 years ago
59:53CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”
CppCon
147K views • 7 years ago
3 comments from Hacker News
You’d need cooperation between your malloc implementation and the application code. It’s possible, but tricky. If your malloc returned a pointer to a pointer, and promised to keep the first level pointer up to date, and was able to lock your application whenever it moved things around, it could work. Someone else already mentioned, but garbage collected languages do actually do this. Because they’re fully in control of memory (the language exposes no raw pointers), they’re able to create the layer of indirection you’ve suggested and move things around as they please. I know at minimum the JVM does this. The term to search for is “heap compaction.” There’s also the weird and wonderful work of Emery Berger et al with their “Mesh” malloc implementation, which blows my mind: ▶ this video .
According to the cppcon talk about Mesh [1] (an allocator that implement compaction for C++ programs), the overhead can be massive too (17% overhead measured on firefox, 50% on redis!) [1] ▶ this video
"Performance matters" by Emery Berger on StrangeLoop'19 is a great talk - link Also, rest of his talks are also fascinating: - ▶ this video - link