From 7a2105becdbadf20c1b4e4d2359e339c90610825 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 4 Mar 1999 11:36:26 +0000 Subject: Use dmalloc instead of EFence when available (dmalloc has lot of improvements over EFence and also hopefully smaller memory overhead, but sadly it's non-free for commercial use). If the DMALLOC_OPTIONS environment variable is not set, switch on `reasonable' checks by default. Also introduced mb_allocz() for cleared mb_alloc(). --- sysdep/autoconf.h.in | 3 +++ sysdep/unix/main.c | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'sysdep') diff --git a/sysdep/autoconf.h.in b/sysdep/autoconf.h.in index a1ef2f8..ae4d6b6 100644 --- a/sysdep/autoconf.h.in +++ b/sysdep/autoconf.h.in @@ -40,3 +40,6 @@ /* Path to configuration files */ #define PATH_CONFIG_DIR ? + +/* Are we using dmalloc? */ +#undef HAVE_LIBDMALLOC diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index e5e9934..45940fb 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -186,6 +187,11 @@ parse_args(int argc, char **argv) int main(int argc, char **argv) { +#ifdef HAVE_LIBDMALLOC + if (!getenv("DMALLOC_OPTIONS")) + dmalloc_debug(0x2f03d00); +#endif + log_init_debug(NULL); parse_args(argc, argv); -- cgit v1.2.3