mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
Add --enable-dmalloc to link against the dmalloc malloc debugger.
It's not as strong as Insure, but it's free, reasonably efficient and works on every platform.
This commit is contained in:
1593
source/configure
vendored
1593
source/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -33,6 +33,14 @@ AC_ARG_ENABLE(developer, [ --enable-developer turn on developer warnings a
|
|||||||
CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
|
CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc enable heap debugging [default=no]])
|
||||||
|
|
||||||
|
if test "x$enable_dmalloc" = xyes
|
||||||
|
then
|
||||||
|
AC_DEFINE(ENABLE_DMALLOC, 1, [Define to turn on dmalloc debugging])
|
||||||
|
LIBS="$LIBS -ldmalloc"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
|
/* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||||
|
|
||||||
/* Define if on AIX 3.
|
/* Define if on AIX 3.
|
||||||
System headers sometimes define this.
|
System headers sometimes define this.
|
||||||
@ -1082,6 +1082,9 @@
|
|||||||
/* Define if you have the socket library (-lsocket). */
|
/* Define if you have the socket library (-lsocket). */
|
||||||
#undef HAVE_LIBSOCKET
|
#undef HAVE_LIBSOCKET
|
||||||
|
|
||||||
|
/* Define to turn on dmalloc debugging */
|
||||||
|
#undef ENABLE_DMALLOC
|
||||||
|
|
||||||
/* Do we have rl_completion_matches? */
|
/* Do we have rl_completion_matches? */
|
||||||
#undef HAVE_NEW_LIBREADLINE
|
#undef HAVE_NEW_LIBREADLINE
|
||||||
|
|
||||||
|
@ -975,6 +975,13 @@ int vasprintf(char **ptr, const char *format, va_list ap);
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* dmalloc -- free heap debugger (dmalloc.org). This should be near
|
||||||
|
* the *bottom* of include files so as not to conflict. */
|
||||||
|
#ifdef DMALLOC
|
||||||
|
# include <dmalloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Some POSIX definitions for those without */
|
/* Some POSIX definitions for those without */
|
||||||
|
|
||||||
#ifndef S_IFDIR
|
#ifndef S_IFDIR
|
||||||
|
@ -45,7 +45,13 @@
|
|||||||
* memory it contains all in one allocation, which might be a bit
|
* memory it contains all in one allocation, which might be a bit
|
||||||
* faster and perhaps use less memory overhead.
|
* faster and perhaps use less memory overhead.
|
||||||
*
|
*
|
||||||
* That smells like a premature optimization, though. -- mbp */
|
* That smells like a premature optimization, though. -- mbp
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If you want testing for memory corruption, link with dmalloc or use
|
||||||
|
* Insure++. It doesn't seem useful to duplicate them here.
|
||||||
|
**/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user