aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/stat_weak_inlines.h6
-rw-r--r--src/vlib/threads.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/vlib/stat_weak_inlines.h b/src/vlib/stat_weak_inlines.h
index a1311e864b3..a68566d0fdd 100644
--- a/src/vlib/stat_weak_inlines.h
+++ b/src/vlib/stat_weak_inlines.h
@@ -63,4 +63,10 @@ vlib_stats_delete_cm (void *notused)
{
}
+void vlib_stats_register_mem_heap (void *) __attribute__ ((weak));
+void
+vlib_stats_register_mem_heap (void *notused)
+{
+}
+
#endif
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index 7c796f5d0ea..499a626e470 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -654,6 +654,7 @@ start_workers (vlib_main_t * vm)
u32 n_vlib_mains = tm->n_vlib_mains;
u32 worker_thread_index;
clib_mem_heap_t *main_heap = clib_mem_get_per_cpu_heap ();
+ vlib_stats_register_mem_heap (main_heap);
vec_reset_length (vlib_worker_threads);