summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1999-12-21 19:28:27 +0000
committerTed Lemon <source@isc.org>1999-12-21 19:28:27 +0000
commit8a82bf6cd1ca1df1c4b6d14f31187f1ae361e187 (patch)
tree970ddbb5560260a98bbecfc74a26ff977d715498
parentd75f594ea87f5943816d30b53fa20a1f09da2563 (diff)
downloadisc-dhcp-8a82bf6cd1ca1df1c4b6d14f31187f1ae361e187.tar.gz
Add malloc debugging definitions.
-rw-r--r--includes/dhcpd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/includes/dhcpd.h b/includes/dhcpd.h
index b52e9392..39599ac3 100644
--- a/includes/dhcpd.h
+++ b/includes/dhcpd.h
@@ -708,6 +708,25 @@ struct dns_query {
int backoff; /* Current backoff, in seconds. */
};
+#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
+#define DMDOFFSET (sizeof (struct dmalloc_preamble))
+#define DMLFSIZE 16
+#define DMUFSIZE 16
+#define DMDSIZE (DMDOFFSET + DMLFSIZE + DMUFSIZE)
+
+struct dmalloc_preamble {
+ struct dmalloc_preamble *prev, *next;
+ size_t size;
+ const char *name;
+ unsigned long generation;
+ unsigned long pad;
+ unsigned char low_fence [DMLFSIZE];
+};
+#else
+#define DMDOFFSET 0
+#define DMDSIZE 0
+#endif
+
/* Bitmask of dhcp option codes. */
typedef unsigned char option_mask [16];