How to treat dynamic memory allocation in algorithm analysis?
You want to read


Wilson et al., Dynamic Storage Allocation: A Survey and Critical Review, 1995


and references therein, especially those to papers by Robson. Here is a quote that answers your question:


  Robson put [in 1974] a fairly tight upper and lower bounds on the
  worst-case performance of the best possible allocation algorithm. He
  showed that a worst-case-optimal strategy's worst-case memory usage
  was somewhere between $0.5M\log_2 n$ and about $0.84 M\log_2 n$.


Here, $M$ is the live memory, and $n$ is the ratio of the largest to the smallest block.

(So, if your algorithm allocates blocks of wildly different sizes, then you may want to think more carefully about how memory allocation works. This doesn't seem to be the case for the example given in the question.)

PS: I was searching for a link to Robson's article and I found this related CSTheory question: Data structure for dynamic memory allocation