misc: fix coverity warnings
[vpp.git] / src / vppinfra / mem_mheap.c
index f3387b7..0ca0053 100644 (file)
 #include <vppinfra/mheap.h>
 #include <vppinfra/os.h>
 
-/* Valgrind stuff. */
-#include <vppinfra/memcheck.h>
-#include <vppinfra/valgrind.h>
-
 void *clib_per_cpu_mheaps[CLIB_MAX_MHEAPS];
 
 void
@@ -114,33 +110,6 @@ clib_mem_init_thread_safe (void *memory, uword memory_size)
   return heap;
 }
 
-#ifdef CLIB_LINUX_KERNEL
-#include <asm/page.h>
-
-uword
-clib_mem_get_page_size (void)
-{
-  return PAGE_SIZE;
-}
-#endif
-
-#ifdef CLIB_UNIX
-uword
-clib_mem_get_page_size (void)
-{
-  return getpagesize ();
-}
-#endif
-
-/* Make a guess for standalone. */
-#ifdef CLIB_STANDALONE
-uword
-clib_mem_get_page_size (void)
-{
-  return 4096;
-}
-#endif
-
 u8 *
 format_clib_mem_usage (u8 * s, va_list * va)
 {
@@ -175,6 +144,12 @@ clib_mem_trace (int enable)
   mheap_trace (clib_mem_get_heap (), enable);
 }
 
+int
+clib_mem_is_traced (void)
+{
+  return mheap_is_traced (clib_mem_get_heap ());
+}
+
 /*
  * fd.io coding-style-patch-verification: ON
  *