Using gc as leak detector?

Ondřej Bílka <[email protected]>
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <[email protected]>
Hi, what I ask now is probably not new so could you point me to prior
art?

Well a garbage collector decides which memory is unreferenced and which
is referenced. A leak detector does almost same thing but must respect
frees.

So my question is what if we added extra byte set to zero before each allocation 
and free would set this to 1. Now when we find garbage we look if it was
freed and print a leak otherwise.

Comments?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.