summaryrefslogtreecommitdiff
path: root/usr/src/lib/libumem/common/envvar.c
diff options
context:
space:
mode:
authorDan Kimmel <dan.kimmel@delphix.com>2016-08-18 15:52:20 -0700
committerMatthew Ahrens <mahrens@delphix.com>2016-08-19 15:01:59 -0700
commit831abf2c3ce98eddc86402eb1c97c92fa48c7349 (patch)
treefac62e5760f561547ed12ec0d07e80dd731a3f84 /usr/src/lib/libumem/common/envvar.c
parentd420209d9c807f782c1d31f5683be74798142198 (diff)
downloadillumos-joyent-831abf2c3ce98eddc86402eb1c97c92fa48c7349.tar.gz
7236 libumem should be able to abort() when an allocation fails
Reviewed by: Alex Reece <alex@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Basil Crow <basil.crow@delphix.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/lib/libumem/common/envvar.c')
-rw-r--r--usr/src/lib/libumem/common/envvar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/src/lib/libumem/common/envvar.c b/usr/src/lib/libumem/common/envvar.c
index 0c4d872814..6c57d9553e 100644
--- a/usr/src/lib/libumem/common/envvar.c
+++ b/usr/src/lib/libumem/common/envvar.c
@@ -26,6 +26,7 @@
/*
* Copyright (c) 2012 Joyent, Inc. All rights reserved.
+ * Copyright (c) 2015 by Delphix. All rights reserved.
*/
#include <ctype.h>
@@ -226,6 +227,10 @@ static umem_env_item_t umem_debug_items[] = {
"Enables writing all logged messages to stderr",
&umem_output, 2
},
+ { "checknull", "Private", ITEM_FLAG,
+ "Abort if an allocation would return null",
+ &umem_flags, UMF_CHECKNULL
+ },
{ NULL, "-- end of UMEM_DEBUG --", ITEM_INVALID }
};