mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-13 07:25:39 +03:00
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.
8 lines
138 B
Bash
8 lines
138 B
Bash
#!/bin/sh
|
|
|
|
XMALLOC_STR=""
|
|
if [ "x${enable_xmalloc}" = "x1" ] ; then
|
|
XMALLOC_STR="xmalloc:false"
|
|
fi
|
|
|
|
export MALLOC_CONF="${XMALLOC_STR}"
|