I think these changes are sane. At least they compile and run with no
obvious problems. It might be that I haven't logged everything
properly. I don't seem to get much output (stderr) when I define
"TRACK_ZALLOC" and "TRACK_MALLOC". I don't think you have to set any
properties to make this code active.
fwiw,
Bill Pringlemeir.
Log: change zdump_used to accommodate updated zone structures. This is
only active when the TRACK_ZALLOC define is used.
Index: zalloc.c
===================================================================
--- zalloc.c (revision 12677)
+++ zalloc.c (working copy)
@@ -262,12 +262,11 @@
gchar *p;
gpointer leakset = leak_init();
- p = zone->zn_base;
- next = zone->zn_next;
-
- for (;;) {
+ for (next = zone->zn_next; next; next = next->sz_next) {
gint cnt = zone->zn_hint; /* Amount of blocks per zone */
+ p = next->sz_base;
+
while (cnt-- > 0) {
if (*(gchar **) p == BLOCK_USED) {
used++;
@@ -275,12 +274,6 @@
}
p += zone->zn_size;
}
-
- if (next == NULL)
- break;
-
- p = next->zn_base;
- next = next->zn_next;
}
if (used != zone->zn_cnt)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel