summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vlib/cli.c2
-rw-r--r--src/vppinfra/dlmalloc.c8
-rw-r--r--src/vppinfra/dlmalloc.h10
-rw-r--r--src/vppinfra/mem_dlmalloc.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index 820fdefd106..ef02d27d288 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -771,7 +771,7 @@ show_memory_usage (vlib_main_t * vm,
/* *INDENT-OFF* */
foreach_vlib_main (
({
- struct mallinfo mi;
+ struct dlmallinfo mi;
void *mspace;
mspace = clib_per_cpu_mheaps[index];
diff --git a/src/vppinfra/dlmalloc.c b/src/vppinfra/dlmalloc.c
index 5316d41b6dc..16f2de0fc09 100644
--- a/src/vppinfra/dlmalloc.c
+++ b/src/vppinfra/dlmalloc.c
@@ -2078,8 +2078,8 @@ static void do_check_malloc_state(mstate m) {
/* ----------------------------- statistics ------------------------------ */
#if !NO_MALLINFO
-static struct mallinfo internal_mallinfo(mstate m) {
- struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+static struct dlmallinfo internal_mallinfo(mstate m) {
+ struct dlmallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
ensure_initialization();
if (!PREACTION(m)) {
check_malloc_state(m);
@@ -3963,7 +3963,7 @@ size_t dlmalloc_set_footprint_limit(size_t bytes) {
}
#if !NO_MALLINFO
-struct mallinfo dlmallinfo(void) {
+struct dlmallinfo dlmallinfo(void) {
return internal_mallinfo(gm);
}
#endif /* NO_MALLINFO */
@@ -4781,7 +4781,7 @@ size_t mspace_set_footprint_limit(mspace msp, size_t bytes) {
}
#if !NO_MALLINFO
-struct mallinfo mspace_mallinfo(mspace msp) {
+struct dlmallinfo mspace_mallinfo(mspace msp) {
mstate ms = (mstate)msp;
if (!ok_magic(ms)) {
USAGE_ERROR_ACTION(ms,ms);
diff --git a/src/vppinfra/dlmalloc.h b/src/vppinfra/dlmalloc.h
index b8e32367400..e710b0c56ca 100644
--- a/src/vppinfra/dlmalloc.h
+++ b/src/vppinfra/dlmalloc.h
@@ -768,14 +768,14 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
/* #define HAVE_USR_INCLUDE_MALLOC_H */
-#ifdef HAVE_USR_INCLUDE_MALLOC_H
+#if 0 // def HAVE_USR_INCLUDE_MALLOC_H
#include "/usr/include/malloc.h"
#else /* HAVE_USR_INCLUDE_MALLOC_H */
#ifndef STRUCT_MALLINFO_DECLARED
/* HP-UX (and others?) redefines mallinfo unless _STRUCT_MALLINFO is defined */
#define _STRUCT_MALLINFO
#define STRUCT_MALLINFO_DECLARED 1
-struct mallinfo {
+struct dlmallinfo {
MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */
MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */
MALLINFO_FIELD_TYPE smblks; /* always 0 */
@@ -837,7 +837,7 @@ extern "C" {
#define dlrealloc_in_place realloc_in_place
#define dlvalloc valloc
#define dlpvalloc pvalloc
-#define dlmallinfo mallinfo
+// #define dlmallinfo mallinfo
#define dlmallopt mallopt
#define dlmalloc_trim malloc_trim
#define dlmalloc_stats malloc_stats
@@ -1084,7 +1084,7 @@ DLMALLOC_EXPORT void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t,
be kept as longs, the reported values may wrap around zero and
thus be inaccurate.
*/
-DLMALLOC_EXPORT struct mallinfo dlmallinfo(void);
+DLMALLOC_EXPORT struct dlmallinfo dlmallinfo(void);
#endif /* NO_MALLINFO */
/*
@@ -1401,7 +1401,7 @@ DLMALLOC_EXPORT size_t mspace_max_footprint(mspace msp);
mspace_mallinfo behaves as mallinfo, but reports properties of
the given space.
*/
-DLMALLOC_EXPORT struct mallinfo mspace_mallinfo(mspace msp);
+DLMALLOC_EXPORT struct dlmallinfo mspace_mallinfo(mspace msp);
#endif /* NO_MALLINFO */
/*
diff --git a/src/vppinfra/mem_dlmalloc.c b/src/vppinfra/mem_dlmalloc.c
index 2b49f8fa703..4a0d032785e 100644
--- a/src/vppinfra/mem_dlmalloc.c
+++ b/src/vppinfra/mem_dlmalloc.c
@@ -382,7 +382,7 @@ format_mheap (u8 * s, va_list * va)
{
void *heap = va_arg (*va, u8 *);
int verbose = va_arg (*va, int);
- struct mallinfo mi;
+ struct dlmallinfo mi;
mheap_trace_main_t *tm = &mheap_trace_main;
mi = mspace_mallinfo (heap);