vppinfra: don't call dlmalloc API directly from the code
[vpp.git] / src / vpp / api / gmon.c
index f665a09..a8eecbb 100644 (file)
@@ -31,7 +31,6 @@
 #include <vppinfra/bitmap.h>
 #include <vppinfra/fifo.h>
 #include <vppinfra/time.h>
-#include <vppinfra/mheap.h>
 #include <vppinfra/heap.h>
 #include <vppinfra/pool.h>
 #include <vppinfra/format.h>
@@ -158,7 +157,7 @@ static clib_error_t *
 gmon_init (vlib_main_t * vm)
 {
   gmon_main_t *gm = &gmon_main;
-  api_main_t *am = &api_main;
+  api_main_t *am = vlibapi_get_main ();
   pid_t *swp = 0;
   f64 *v = 0;
   clib_error_t *error;