u/GelHydroalcooliquein r/rust • Recommends
On “Why linux build of the program consumes several times more RAM?”
#mevi#userfaultfd#virtualmemory
57K subscribers • 8 videos on Hallway
Advanced. Deep dive for people who know the field.
70K views3 years ago3 recommendations
Systems programmingProgramming languagesMemory managementRustLinux
Amos Wenger explains how he built mevi, a custom memory profiler, using Linux userfaultfd to visualize virtual memory allocations in Rust.
To try everything Brilliant has to offer—free—for a full 30 days, visit brilliant.org/fasterthanlime The first 200 of you will get 20% off Brilliant’s annual premium subscription. This video was sponsored by Brilliant. Follow me on Mastodon: hachyderm.io/@fasterthanlime Support me on Patreon or GitHub: fasterthanli.me/donate Source code for the memory visualizer: github.com/fasterthanlime/mevi "The Linux Memory Manager" book (Lorenzo Stoakes): linuxmemory.org/ (Reference continue below) Contents Intro Memory fragmentation explained with cars Virtual memory 101 Observing simple programs with mevi Sponsored segment (real) Why does this Rust program leak memory, visualized mevi is Rust on the front & back userfaultfd: the reason why mevi works (slowly) The hard bits Some bigger programs seen through mevi Y'all are so good to me More references The Quest for Netflix on Asahi Linux (David Buchanan): da.vidbuchanan.co.uk/blog/netflix-on-asahi.html Making our own executable packer: fasterthanli.me/series/making-our-own-executable-packer Swiss Tables Design Notes (Abseil): abseil.io/about/design/swisstables SwissTable CppCon talk (Matt Kulukundis): youtube.com/watch?v=ncHmEUmJZf4 Live migration: en.wikipedia.org/wiki/Live_migration Chromium’s Zygote process: chromium.googlesource.com/chromium/src/+/HEAD/docs/linux/zyg… bytehound memory profiler: github.com/koute/bytehoundWhat people say. Recommended for its excellent visualization of heap memory allocations, virtual memory, and mmap behavior.
u/GelHydroalcooliquein r/rust • Recommends
On “Why linux build of the program consumes several times more RAM?”
u/ear7hin r/rust • Recommends
On “Vec::with_capacity() against Vec::new() is a about same perfomance.”
u/RB5009in r/rust • Recommends
On “I made a Vector for large amounts of data, that does not copy when growing, by using full mmap'd pages.”