HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

CppCon 2019: Emery Berger “Mesh: Automatically Compacting Your C++ Application's Memory”

CppCon2 HN recommenders · recommended in 2 months, 2019-2023
YouTube
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.

C, C++, Rust, Go & systems languagesSoftware performance & optimization#mesh#malloc#memoryfragmentation#compaction#c++

3 comments from Hacker News

@samwho2023 · in “A highly intuitive visual guide on how memory allocation works, step by step”

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 .

RecommendsView on HN
@atom32021 · in “GC progress from JDK 8 to JDK 17”

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

CitesView on HN
@divan2019 · in “Ask HN: Best Talks of 2019?”

"Performance matters" by Emery Berger on StrangeLoop'19 is a great talk - link Also, rest of his talks are also fascinating: - ▶ this video - link

RecommendsView on HN
"Compacting the Uncompactable" by Bobby Powers40:18

"Compacting the Uncompactable" by Bobby Powers

Strange Loop Conference
29K views • 7 years ago
CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”1:04:26

CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”

CppCon
40K views • 8 years ago
Plenary: Performance Matters - Emery Berger - CppCon 20201:01:09

Plenary: Performance Matters - Emery Berger - CppCon 2020

CppCon
32K views • 6 years ago
The One-Decade Task: Putting std::atomic in CUDA. - Olivier Giroux - CppCon 20191:05:39

The One-Decade Task: Putting std::atomic in CUDA. - Olivier Giroux - CppCon 2019

CppCon
11K views • 7 years ago
CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”1:39:25

CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”

CppCon
149K views • 10 years ago
CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"1:29:54

CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"

CppCon
188K views • 11 years ago
CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"1:13:41

CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"

CppCon
235K views • 12 years ago
CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"55:49

CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"

CppCon
119K views • 10 years ago
CppCon 2014: Mike Acton "Data-Oriented Design and C++"1:27:46

CppCon 2014: Mike Acton "Data-Oriented Design and C++"

CppCon
862K views • 12 years ago
CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced.  What do they really do?”1:14:22

CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”

CppCon
288K views • 9 years ago
CppCon 2015: Andrei Alexandrescu “std::allocator...”1:12:27

CppCon 2015: Andrei Alexandrescu “std::allocator...”

CppCon
196K views • 11 years ago
2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++1:33:02

2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++

CppNow
34K views • 13 years ago
CppCon 2017: Chandler Carruth “Going Nowhere Faster”1:00:58

CppCon 2017: Chandler Carruth “Going Nowhere Faster”

CppCon
113K views • 9 years ago
CppCon 2019: Matt Godbolt “Path Tracing Three Ways: A Study of C++ Style”55:42

CppCon 2019: Matt Godbolt “Path Tracing Three Ways: A Study of C++ Style”

CppCon
77K views • 7 years ago
CppCon 2015: Sean Parent "Better Code: Data Structures"1:04:00

CppCon 2015: Sean Parent "Better Code: Data Structures"

CppCon
106K views • 11 years ago
CppCon 2018: Nicolai Josuttis “The Nightmare of Initialization in C++”59:58

CppCon 2018: Nicolai Josuttis “The Nightmare of Initialization in C++”

CppCon
79K views • 8 years ago
CppCon 2014: Jeff Preshing "How Ubisoft Develops Games for Multicore - Before and After C++11"1:04:33

CppCon 2014: Jeff Preshing "How Ubisoft Develops Games for Multicore - Before and After C++11"

CppCon
53K views • 12 years ago
CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"31:19

CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"

CppCon
122K views • 10 years ago
CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”1:19:52

CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”

CppCon
264K views • 10 years ago
CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”59:53

CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”

CppCon
147K views • 7 years ago