The farebox recovery ratio in many western nations are not enough to ever fully fund public transport. In many cases, the systems to collect fares end up costing hundreds of millions of dollars. These costs are never made back. It makes sense to make it free.
I believe Bryant and O'Hallaron wrote a text book just for this course. You can always "optimize" it by reverse engineering the benchmark app and providing the correctly aligned blocks to the bench-marking application. It'll beat the standard malloc calls by several magnitudes if you were to do that.
This is one of the reasons why people write custom allocators - to suit a specific purpose where the allocation pattern is known well in advance.