diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index 2697c0a..2bdc98c 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -739,6 +739,7 @@
 show_memory_usage (vlib_main_t * vm,
 		   unformat_input_t * input, vlib_cli_command_t * cmd)
 {
+  clib_mem_main_t *mm = &clib_mem_main;
   int verbose __attribute__ ((unused)) = 0;
   int api_segment = 0, stats_segment = 0, main_heap = 0, numa_heaps = 0;
   clib_error_t *error;
@@ -826,7 +827,7 @@
         ({
           struct dlmallinfo mi;
           void *mspace;
-          mspace = clib_per_cpu_mheaps[index];
+          mspace = mm->per_cpu_mheaps[index];
 
           mi = mspace_mallinfo (mspace);
           vlib_cli_output (vm, "%sThread %d %s\n", index ? "\n":"", index,
@@ -835,7 +836,7 @@
                            pointer_to_uword (mspace_least_addr(mspace)),
                            mi.arena);
           vlib_cli_output (vm, "  %U\n", format_mheap,
-                           clib_per_cpu_mheaps[index],
+                           mm->per_cpu_mheaps[index],
                            verbose);
           index++;
         }));
@@ -849,17 +850,17 @@
 	struct dlmallinfo mi;
 	void *mspace;
 
-	for (i = 0; i < ARRAY_LEN (clib_per_numa_mheaps); i++)
+	for (i = 0; i < ARRAY_LEN (mm->per_numa_mheaps); i++)
 	  {
-	    if (clib_per_numa_mheaps[i] == 0)
+	    if (mm->per_numa_mheaps[i] == 0)
 	      continue;
-	    if (clib_per_numa_mheaps[i] == clib_per_cpu_mheaps[i])
+	    if (mm->per_numa_mheaps[i] == mm->per_cpu_mheaps[i])
 	      {
 		vlib_cli_output (vm, "Numa %d uses the main heap...", i);
 		continue;
 	      }
 	    was_enabled = clib_mem_trace_enable_disable (0);
-	    mspace = clib_per_numa_mheaps[i];
+	    mspace = mm->per_numa_mheaps[i];
 
 	    mi = mspace_mallinfo (mspace);
 	    vlib_cli_output (vm, "Numa %d:", i);
@@ -867,7 +868,7 @@
 			     pointer_to_uword (mspace_least_addr (mspace)),
 			     mi.arena);
 	    vlib_cli_output (vm, "  %U\n", format_mheap,
-			     clib_per_numa_mheaps[index], verbose);
+			     mm->per_numa_mheaps[index], verbose);
 	  }
       }
   }
@@ -921,6 +922,7 @@
 			     unformat_input_t * input,
 			     vlib_cli_command_t * cmd)
 {
+  clib_mem_main_t *mm = &clib_mem_main;
   unformat_input_t _line_input, *line_input = &_line_input;
   int enable = 1;
   int api_segment = 0;
@@ -1003,15 +1005,15 @@
 
   if (numa_id != ~0)
     {
-      if (numa_id >= ARRAY_LEN (clib_per_numa_mheaps))
+      if (numa_id >= ARRAY_LEN (mm->per_numa_mheaps))
 	return clib_error_return (0, "Numa %d out of range", numa_id);
-      if (clib_per_numa_mheaps[numa_id] == 0)
+      if (mm->per_numa_mheaps[numa_id] == 0)
 	return clib_error_return (0, "Numa %d heap not active", numa_id);
 
-      if (clib_per_numa_mheaps[numa_id] == clib_mem_get_heap ())
+      if (mm->per_numa_mheaps[numa_id] == clib_mem_get_heap ())
 	return clib_error_return (0, "Numa %d uses the main heap...",
 				  numa_id);
-      current_traced_heap = clib_per_numa_mheaps[numa_id];
+      current_traced_heap = mm->per_numa_mheaps[numa_id];
       oldheap = clib_mem_set_heap (current_traced_heap);
       clib_mem_trace (1);
       clib_mem_set_heap (oldheap);
