diff options
author | Martin Mares <mj@ucw.cz> | 1999-03-04 12:36:26 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1999-03-04 12:36:26 +0100 |
commit | 7a2105becdbadf20c1b4e4d2359e339c90610825 (patch) | |
tree | 524bc4947ec1938cd48e3ec6a44a9f66983f8e4b /sysdep/unix | |
parent | aa64578641c15b137172acc927d9d7af5914576b (diff) | |
download | bird-7a2105becdbadf20c1b4e4d2359e339c90610825.tar bird-7a2105becdbadf20c1b4e4d2359e339c90610825.zip |
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().
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 <stdio.h> #include <string.h> +#include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <sys/signal.h> @@ -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); |