Implementing Malloc: Students and Systems Programming [pdf]
Doing this lab was one of my more memorable experiences at CMU. It was tons of fun, but barely getting any sleep for 3 days because I put the assignment off was less fun.I put in some horrible last minute hacks to optimize for the autograder and raise my grade, like doing a pseudo-bubble sort. Every time I coalesced two adjacent free blocks, I would compare the adjacent nodes in the linked list and swap them if they weren't sorted. That raised my allocation efficiency a tiny bit for certain test vectors- just high enough to bump my grade up a couple points. :)