summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/memory_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibmemory/memory_api.c')
-rw-r--r--src/vlibmemory/memory_api.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c
index 205bea57532..4d31b35f132 100644
--- a/src/vlibmemory/memory_api.c
+++ b/src/vlibmemory/memory_api.c
@@ -459,6 +459,22 @@ vl_mem_api_init (const char *region_name)
return 0;
}
+static clib_error_t *
+map_api_segment_init (vlib_main_t * vm)
+{
+ api_main_t *am = &api_main;
+ int rv;
+
+ if ((rv = vl_mem_api_init (am->region_name)) < 0)
+ {
+ return clib_error_return (0, "vl_mem_api_init (%s) failed",
+ am->region_name);
+ }
+ return 0;
+}
+
+VLIB_INIT_FUNCTION (map_api_segment_init);
+
static void
send_memclnt_keepalive (vl_api_registration_t * regp, f64 now)
{