mallinfo has been supported since the beginning in glibc. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- configure.ac | 1 - include/builddefs.in | 1 - m4/package_libcdev.m4 | 20 -------------------- scrub/Makefile | 4 ---- scrub/xfs_scrub.c | 6 ------ 5 files changed, 32 deletions(-) diff --git a/configure.ac b/configure.ac index 32efad760..0fa900d95 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,6 @@ AC_NEED_INTERNAL_FSCRYPT_POLICY_V2 AC_HAVE_GETFSMAP AC_HAVE_MAP_SYNC AC_HAVE_DEVMAPPER -AC_HAVE_MALLINFO AC_HAVE_MALLINFO2 AC_PACKAGE_WANT_ATTRIBUTES_H AC_HAVE_LIBATTR diff --git a/include/builddefs.in b/include/builddefs.in index c359cde45..0df78f933 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -98,7 +98,6 @@ NEED_INTERNAL_FSCRYPT_POLICY_V2 = @need_internal_fscrypt_policy_v2@ HAVE_GETFSMAP = @have_getfsmap@ HAVE_MAP_SYNC = @have_map_sync@ HAVE_DEVMAPPER = @have_devmapper@ -HAVE_MALLINFO = @have_mallinfo@ HAVE_MALLINFO2 = @have_mallinfo2@ HAVE_LIBATTR = @have_libattr@ HAVE_LIBICU = @have_libicu@ diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index 320809a62..f29bdd76f 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -137,26 +137,6 @@ int flags = MAP_SYNC | MAP_SHARED_VALIDATE; AC_SUBST(have_map_sync) ]) -# -# Check if we have a mallinfo libc call -# -AC_DEFUN([AC_HAVE_MALLINFO], - [ AC_MSG_CHECKING([for mallinfo ]) - AC_COMPILE_IFELSE( - [ AC_LANG_PROGRAM([[ -#include <malloc.h> - ]], [[ -struct mallinfo test; - -test.arena = 0; test.hblkhd = 0; test.uordblks = 0; test.fordblks = 0; -test = mallinfo(); - ]]) - ], have_mallinfo=yes - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) - AC_SUBST(have_mallinfo) - ]) - # # Check if we have a mallinfo2 libc call # diff --git a/scrub/Makefile b/scrub/Makefile index f3e22a9d6..846774619 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -81,10 +81,6 @@ LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBICU_LIBS) $(LIBRT) $(LIBURCU) \ LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG) LLDFLAGS = -static -ifeq ($(HAVE_MALLINFO),yes) -LCFLAGS += -DHAVE_MALLINFO -endif - ifeq ($(HAVE_MALLINFO2),yes) LCFLAGS += -DHAVE_MALLINFO2 endif diff --git a/scrub/xfs_scrub.c b/scrub/xfs_scrub.c index 752180d64..736af2711 100644 --- a/scrub/xfs_scrub.c +++ b/scrub/xfs_scrub.c @@ -296,7 +296,6 @@ report_mem_usage( const char *phase, const struct phase_rusage *pi) { -#if defined(HAVE_MALLINFO2) || defined(HAVE_MALLINFO) # ifdef HAVE_MALLINFO2 struct mallinfo2 mall_now = mallinfo2(); # else @@ -306,11 +305,6 @@ report_mem_usage( phase, kbytes(mall_now.arena), kbytes(mall_now.hblkhd), kbytes(mall_now.uordblks), kbytes(mall_now.fordblks)); -#else - fprintf(stdout, _("%sMemory used: %lluk, "), - phase, - kbytes(((char *) sbrk(0)) - ((char *) pi->brk_start))); -#endif } /* Report usage stats. */ -- 2.39.2