diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-07-12 11:34:16 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-07-12 16:21:03 +0000 |
commit | 0af49a8fc94c57c71c97909fbb8b7acc403f980a (patch) | |
tree | b565677721c260809628b4d796a03a762067bf0a /src/svm/ssvm.c | |
parent | 2f7364a9adc99bf077d3004a696742a7e3cffff4 (diff) |
svm: handles heap dlmalloc allocation failure
Type: fix
Fixes: 6a5adc3695
Change-Id: I21091fc2938cababeb28bacf7c5e457a05ab6272
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/svm/ssvm.c')
-rw-r--r-- | src/svm/ssvm.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 |