Skip to content
HHackerTube.videoSurprise me

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

CppCon 2019: Emery Berger “Mesh: Automatically Compacting Your C++ Application's Memory” on HackerTube: recommended by 2 Hacker News commenters across 2 separate months, 2019–2023.

CppCon

talk · advanced · evergreen

Open on YouTube

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.

Why Hacker News recommends it

HN recommends Berger's talks as fascinating and cites Mesh as mind-blowing memory allocator work.

people recommended it
2
separate months
2
strong recommendations
0
discussed on HN
2019–2023
“the weird and wonderful work of Emery Berger et al with their “Mesh” malloc implementation, which blows my mind”
— samwho, May 2023, in “A highly intuitive visual guide on how memory allocation works, step by step”

What HN commenters said

3 Hacker News comments link this video. Each one links back to its thread.

samwhoMay 2023Recommends

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 .

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

divanDec 2019Recommends

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

in “Ask HN: Best Talks of 2019?” · View on HN

atom3Nov 2021Cites it

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

in “GC progress from JDK 8 to JDK 17” · View on HN

Topics & tags