MP3++
Beating the built-in malloc
Due dates are the same as for the last part of MP3, and may be found on the schedule.

Looking to explore malloc a bit more? This MP plus-plus is for you!

1 Initial Files

In your CS 340 directory, merge the initial starting files with the following commands:

git fetch release
git merge release/mp3pp --allow-unrelated-histories  -m "Merging initial files"

2 Requirements

On a Linux system, the version of the alloc functions provided are VERY GOOD in the general case. This version of code provided on Linux systems of must handle programs that make small allocations, large allocations, and everything in between! Since it comes with the C programming library, this default malloc is commonly referred to as libc malloc.

One reason people make special-purpose memory allocators is to improve memory allocations for a subset of problems. Can you beat libc malloc for a specific subset of code?

Copy your existing alloc.c into the mp3pp directory and optimize it to be as space efficient and past as possible on the five provided testers. Specifically, you must:

The provided test suite tests both of these conditions. If you get to the timed tests, you will find that a summary is printed for you to show how your alloc preformed relative to libc.

You only have to beat libc malloc on the five testers; most students who succeed at this MP++ do so by optimizing for those cases. You may eventually be able to build a malloc that beats libc’s in general, and possibly even have yours be adopted by libc, but probably not as part of your first attempt at building an allocator.

3 Submission and Grading

3.1 Submission

Once you have locally passed all the tests, you will need to submit and grade your code. First commit using the standard git commands:

git add -A
git commit -m "MP submission"
git push

3.2 Grading

The initial grading is done via a manual GitHub Action. You MUST complete this step before the deadline to earn any points for the MP:

3.3 Points

MP plus-pluses award extra credit, but only if all tests (autograder) pass.