4 ms·
Ah, the legendary and beloved malloc lab. I am really glad they are working to keep this one visible and modernized. I know a lot of schools do this, but if yo
by cvoss 9y ago
Ah, the legendary and beloved malloc lab. I am really glad they are working to keep this one visible and modernized.
I know a lot of schools do this, but if you've never had to write your own allocator, I cannot recommend it enough as an exercise!
Implementing a general-purpose malloc from scratch and attempting to beat cstdlib's malloc goes down as one of the top 3 most invaluable programming projects in the CS curriculum at my school. (The others being an OS kernel and a register allocator.) I do not do low-level programming in real life--at all--but I think every computer scientist and software engineer should have an understanding of all that has to go on to support shinier layers.