svm: handles heap dlmalloc allocation failure
[vpp.git] / src / svm / ssvm.c
index 605b692..feba7f9 100644 (file)
@@ -370,6 +370,12 @@ ssvm_master_init_private (ssvm_private_t * ssvm)
   }
 #else
   heap = create_mspace (rnd_size, 1 /* locked */ );
+  if (heap == 0)
+    {
+      clib_unix_warning ("mheap alloc");
+      return -1;
+    }
+
   mspace_disable_expand (heap);
 #endif