From: Benoît Ganne Date: Fri, 12 Jul 2019 09:34:16 +0000 (+0200) Subject: svm: handles heap dlmalloc allocation failure X-Git-Tag: v20.01-rc0~188 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=0af49a8fc94c57c71c97909fbb8b7acc403f980a;p=vpp.git svm: handles heap dlmalloc allocation failure Type: fix Fixes: 6a5adc3695 Change-Id: I21091fc2938cababeb28bacf7c5e457a05ab6272 Signed-off-by: Benoît Ganne --- diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c index 605b692e91f..feba7f93496 100644 --- a/src/svm/ssvm.c +++ b/src/svm/ssvm.c @@ -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