HackerTubewatch
Surprise me
Frame from CppCon 2019: Emery Berger “Mesh: Automatically Compacting Your C++ Application's Memory” Plays via YouTube's privacy-enhanced embed

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

48 videos recommended on HN
YouTube
2 HN users recommended this talk2 months2019–2023 score 2
Years with an HN recommendation, 2007–2026

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

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.

“the weird and wonderful work of Emery Berger et al with their “Mesh” malloc implementation, which blows my mind” (HN, 2023)

2 recommendations · 1 citations · Talks · advanced

3 Hacker News comments

From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.

@divan Dec 2019 Recommends
on HN thread 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]
Emery Berger's talks are fascinating
@samwho May 2023 Recommends
on HN thread A highly intuitive visual guide on how memory allocation works, step by step
Read more
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] .
Mesh malloc compacts memory in C++ programs

Citations, criticism and jokes

@atom3 Nov 2021 Cites it
on HN thread 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]
Mesh talk reports compaction overhead numbers

Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.

Keyboard shortcuts

/
Search
j k
Next / previous video
r
Surprise me
l
Like (video page)
w
Watch later (video page)
?
This help
Esc
Close