mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 04:03:11 +00:00
Replace experimental_infallible_new with compile-time flag
The runtime option aborted on every OOM, breaking new(std::nothrow) semantics. Replace with configure-time --enable-cxx-infallible-new (default off): when on, throwing new aborts (size logged) and nothrow returns null; when off, standard new_handler + bad_alloc / null behavior is preserved. Under LTO the on-path lets the compiler prove operator new is no-throw.
This commit is contained in:
@@ -266,6 +266,7 @@ TEST_BEGIN(test_mallctl_config) {
|
||||
TEST_MALLCTL_CONFIG(cache_oblivious, bool);
|
||||
TEST_MALLCTL_CONFIG(debug, bool);
|
||||
TEST_MALLCTL_CONFIG(fill, bool);
|
||||
TEST_MALLCTL_CONFIG(infallible_new, bool);
|
||||
TEST_MALLCTL_CONFIG(lazy_lock, bool);
|
||||
TEST_MALLCTL_CONFIG(malloc_conf, const char *);
|
||||
TEST_MALLCTL_CONFIG(prof, bool);
|
||||
|
||||
Reference in New Issue
Block a user