A. Student wrote:
Kind of a last-minute discovery, but it might save
someone from frantic
bug-hunting anyway: there's a bug in malloctest.c, test 2. When it attempts
to allocate a second block to ensure that the memory from the first has
been correctly freed, it never frees that second block, so you end up very
quickly leaking away most of your memory, until eventually it can't
allocate any at which point you have an infinite loop of "0 bytes: failed".
If you only run test 2 once and don't run any other tests, you won't see
the leak, but as soon as you start trying to run multiple tests it shows up.
Oops....
Everybody take note. :-|
--
- David A. Holland / dholland(a)eecs.harvard.edu