summaryrefslogtreecommitdiffstats
path: root/lib/libstand/zalloc_defs.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-07-20 04:18:20 +0000
committerpeter <peter@FreeBSD.org>2002-07-20 04:18:20 +0000
commitc7181950f3493ca9216d41ff1f5bf0e783f55f2e (patch)
tree95f9d7512ae7144422a04c5de32a3fa7f9db0f88 /lib/libstand/zalloc_defs.h
parent7409589c7afc48621815fb92ece4a2ad2fe9cd75 (diff)
downloadFreeBSD-src-c7181950f3493ca9216d41ff1f5bf0e783f55f2e.zip
FreeBSD-src-c7181950f3493ca9216d41ff1f5bf0e783f55f2e.tar.gz
Reimplement malloc/free debugging that includes the offending file:line
info. This turned out to be rather useful on ia64 for tracking down malloc/free problems. Detect duplicate free()'s - otherwise these show up as a guard1 failure and it looks like corruption instead of something simple like a second free() where there shouldn't be. Deal with libz using libc headers and not seeing the malloc/free stuff that we provide in libstand. Do similar nastiness to what is done for bzlib. Tested on: i386, ia64 (compile, run)
Diffstat (limited to 'lib/libstand/zalloc_defs.h')
-rw-r--r--lib/libstand/zalloc_defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libstand/zalloc_defs.h b/lib/libstand/zalloc_defs.h
index b51b6b2..b7ba063 100644
--- a/lib/libstand/zalloc_defs.h
+++ b/lib/libstand/zalloc_defs.h
@@ -96,6 +96,7 @@ typedef struct Guard {
#define MATYPE long double
#define MALLOCALIGN ((sizeof(MATYPE) > sizeof(Guard)) ? sizeof(MATYPE) : sizeof(Guard))
#define GAMAGIC 0x55FF44FD
+#define GAFREE 0x5F54F4DF
#include "zalloc_protos.h"
OpenPOWER on IntegriCloud