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:
@@ -217,6 +217,15 @@ any of the following arguments (not a definitive list) to 'configure':
|
||||
Disable C++ integration. This will cause new and delete operator
|
||||
implementations to be omitted.
|
||||
|
||||
* `--enable-cxx-infallible-new`
|
||||
|
||||
Make the throwing `operator new` abort on allocation failure (logging the
|
||||
requested size) instead of throwing `std::bad_alloc`; the `std::nothrow`
|
||||
overloads still return null. Disabled by default, and has no effect when
|
||||
C++ integration is disabled (`--disable-cxx`). When enabled, under LTO
|
||||
this lets the compiler treat `operator new` as non-throwing and elide
|
||||
exception-handling cleanup in callers.
|
||||
|
||||
* `--with-xslroot=<path>`
|
||||
|
||||
Specify where to find DocBook XSL stylesheets when building the
|
||||
|
||||
Reference in New Issue
Block a user