Last week, I was debugging some (seemingly) dynamic memory related problems (e.g., malloc, realloc and free). For this, I wrote some code to log all memory (de)allocations to Serial, and a script to analyze the results. In case it is useful for someone else as well, I've published the code on my blog:
think it is useful for the tech savvy.
What you could do is to also check the value of (p-2) as there the length of the allocated block is stored IIRC.
p = malloc(n) ==> [ length] [address where p points to] [... additional bytes]