From: Hans-Bernhard B. <br...@ph...> - 2004-07-22 22:30:51
|
On Thu, 22 Jul 2004, Ethan Merritt wrote: > The existence of the routine gp_alloc(mem,"tag label") suggests that > some such facility was intended, but since there is no corresponding > routine gp_free I don't see how to use it for this purpose. There is a checked_free() instead, and free() is defined to it. See alloc.h:67 # define free(x) checked_free(x) > Is there some clever way of asking for a dump of the currently > allocated memory chunks? I don't think so. But feel free to inspect alloc.c for yourself. In a nutshell, all it should take is to compile with CHECK_HEAP_USE defined, and you'll get a report if anything goes wrong. OTOH, it's usually quite a bit easier to use existing external tools for this. E.g. valgrind, or glibc's malloc() debugging facilities. ElectricFence should suffice, too. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |