mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-24 16:13:38 +03: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:
parent
a6048680a8
commit
160ab9d7f6
19 changed files with 103 additions and 44 deletions
|
|
@ -731,11 +731,6 @@ malloc_conf_init_helper(sc_data_t *sc_data, unsigned bin_shard_sizes[SC_NBINS],
|
|||
if (config_xmalloc) {
|
||||
CONF_HANDLE_BOOL(opt_xmalloc, "xmalloc")
|
||||
}
|
||||
if (config_enable_cxx) {
|
||||
CONF_HANDLE_BOOL(
|
||||
opt_experimental_infallible_new,
|
||||
"experimental_infallible_new")
|
||||
}
|
||||
|
||||
CONF_HANDLE_BOOL(opt_experimental_tcache_gc,
|
||||
"experimental_tcache_gc")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue