Debugging Your Operating System: A Lesson In Memory Allocation https://lukasa.co.uk/2016/12/Debugging_Your_Operating_System/ (superb, accessible deep dive into calloc and paging)
miniblog.
Related Posts
Most of the code I write is in a garbage collected language.
I'm often surprised how much extra performance I can get when I can control allocations. I saved ~10% runtime in difftastic by moving to a zero-allocation colour library (owo_colours)!
It's wonderfully easy to switch out the allocator in Rust: https://doc.rust-lang.org/edition-guide/rust-next/no-jemalloc.html
Sadly it didn't help difftastic performance despite doing a lot of allocation, but it's really easy to try it!
Finally got dynamic string allocation working in my toy compiler! https://github.com/Wilfred/proper-compiler-hat/commit/cd726f45eb0540eb54c2c3c7e0ab75a651c46a43
Implementing intrinsics made this way easier: writing a single large assembly function is a pain.