From 0af49a8fc94c57c71c97909fbb8b7acc403f980a Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Fri, 12 Jul 2019 11:34:16 +0200 Subject: svm: handles heap dlmalloc allocation failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Type: fix Fixes: 6a5adc3695 Change-Id: I21091fc2938cababeb28bacf7c5e457a05ab6272 Signed-off-by: Benoît Ganne --- src/svm/ssvm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 -- cgit 1.2.3-korg