diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-03-30 15:53:59 +0200 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-03-30 15:53:59 +0200 |
commit | 41be32bfe6d0d6ed0058babdcbc3aac18988dbec (patch) | |
tree | f0b516abae4a83abf0a5daa41eb4fb7afb266695 /configure.ac | |
parent | [solaris] revert previous update of manifest install path (diff) | |
download | frr-41be32bfe6d0d6ed0058babdcbc3aac18988dbec.tar.xz frr-41be32bfe6d0d6ed0058babdcbc3aac18988dbec.zip |
[lib/memory] Add mallinfo support
2006-02-15 Paul Jakma <paul.jakma@sun.com>
* configure.ac: Check for mallinfo, being careful to link test
so we can detect things like umem being used (which doesn't
provide a mallinfo).
* lib/memory.c: (mtype_memstr) new helper function to
return human friendly string for a byte count.
(mtype_stats_alloc) new function, for users to retrieve
number of objects allocated.
(show_memory_mallinfo) New function, show mallinfo statistics
if available.
(show_memory_all_cmd) Call show_memory_mallinfo, if mallinfo
is available.
* lib/memory.h: Export mtype_memstr and mtype_stats_alloc.
Provide a define for a reasonable buffer size for
mtype_memstr.
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 8727e5dcd..841786fc2 100755 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org> ## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st> ## -## $Id: configure.ac,v 1.118 2006/01/31 10:09:27 paul Exp $ +## $Id: configure.ac,v 1.119 2006/03/30 13:53:59 paul Exp $ AC_PREREQ(2.53) AC_INIT(Quagga, 0.99.3, [http://bugzilla.quagga.net]) @@ -1236,6 +1236,24 @@ if test x"${ac_cv_header_execinfo_h}" = x"yes"; then ) fi +dnl ----------------------------------------- +dnl check for malloc mallinfo struct and call +dnl this must try and link using LIBS, in +dnl order to check no alternative allocator +dnl has been specified, which might not provide +dnl mallinfo, e.g. such as Umem on Solaris. +dnl ----------------------------------------- +AC_CHECK_HEADERS(malloc.h, + [AC_MSG_CHECKING(whether mallinfo is available) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]], + [[struct mallinfo ac_x; ac_x = mallinfo ();]])], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MALLINFO,,mallinfo)], + AC_MSG_RESULT(no) + ) + ] +) + dnl ---------- dnl configure date dnl ---------- |