~/talk

Track your memory allocation

Talkat RustLab 2025 · 2025-11-03..11-04· [rust]
slides:none on file

Implements a custom global allocator that instruments malloc via the GlobalAlloc API, records stacks and emits a memory flamegraph HTML, so you see exact callsites and bytes. Demos show surprising hotspots: regex compilation costing multiple megabytes, sqlx connection pool causing ~35 KB total with ~5 KB per request. Works end-to-end for Rust allocations, with caveats: requires a configured maximum buffer, and logging/reentrancy around allocation causes runtime bugs to handle.

AI-written summary · about

  1. 0:00Introduction
  2. 3:43Memory allocation challenges
  3. 6:18Stack vs heap allocation
  4. 10:04Memory tools and concepts
  5. 13:25Rust’s allocation primitives
  6. 16:41Custom global allocator
  7. 19:59Demo: custom allocator
  8. 24:04Tracking allocations with flame graphs
  9. 26:59Live demo: memory tracking
  10. 31:02Dependency memory usage
  11. 34:42Production takeaways
  12. 36:09Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.