diff options
Diffstat (limited to 'vlib-api/vlibmemory/memory_vlib.c')
-rw-r--r-- | vlib-api/vlibmemory/memory_vlib.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/vlib-api/vlibmemory/memory_vlib.c b/vlib-api/vlibmemory/memory_vlib.c index 57cb8f74012..7ba76ec49d1 100644 --- a/vlib-api/vlibmemory/memory_vlib.c +++ b/vlib-api/vlibmemory/memory_vlib.c @@ -1046,9 +1046,10 @@ VLIB_CLI_COMMAND (trace, static) = { clib_error_t * vlibmemory_init (vlib_main_t * vm) { - /* Do this early, to avoid glibc malloc fubar */ - svm_region_init(); - return 0; + api_main_t *am = &api_main; + /* Normally NULL, can be set by cmd line "chroot {prefix foo}" */ + svm_region_init_chroot (am->root_path); + return 0; } VLIB_INIT_FUNCTION (vlibmemory_init); @@ -1060,13 +1061,6 @@ void vl_set_memory_region_name (char *name) am->region_name = name; } -void vl_set_memory_root_path (char *name) -{ - api_main_t *am = &api_main; - - am->root_path = name; -} - static int range_compare (vl_api_msg_range_t * a0, vl_api_msg_range_t * a1) { int len0, len1, clen; |