Building a Memory Allocator from Scratch in C

(0xkiire.com)

14 points | by kiirecodes 11 hours ago

2 comments

  • msarnoff 1 hour ago
    This was a class assignment in the 15-213 class at Carnegie Mellon. The staff had set up a test suite and an online leaderboard to rank the speed of each student's malloc implementation.

    I figured out that the test cases allocated a disproportionate amount of X-byte blocks. I was able to get to the top by hardcoding a specific freelist just for X-byte blocks.

    Learned a lesson about easily it is to game a benchmark :)

  • pillmillipedes 10 hours ago
    [dead]