HackerTube.dev

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

CppCon · 14.7K views · 2019-10-11 · 36:10

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

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.

On Hacker News

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

Recommended by 2 HN people across 2 months · HN mentions 2019–2023

Topics

Search by tags

What people said

samwho · 2023-05 · Recommendation

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: [VIDEO] .

Read the original HN comment ↗
divan · 2019-12 · Recommendation

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

Read the original HN comment ↗
atom3 · 2021-11 · Reference

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] [VIDEO]

Read the original HN comment ↗

Sources

Video by CppCon, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources