mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 14:09:31 +03:00
Merge 4d62cbde3a
into af21001f7a
This commit is contained in:
commit
253915b896
1 changed files with 5 additions and 1 deletions
|
@ -465,7 +465,11 @@ static bool mi_try_new_handler(bool nothrow) {
|
|||
_mi_error_message(ENOMEM, "out of memory in 'new'");
|
||||
#if defined(_CPPUNWIND) || defined(__cpp_exceptions) // exceptions are not always enabled
|
||||
if (!nothrow) {
|
||||
throw std::bad_alloc();
|
||||
#if defined(__GNUC__) && !defined(__EXCEPTIONS)
|
||||
abort();
|
||||
#else
|
||||
throw std::bad_alloc();
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
MI_UNUSED(nothrow);
|
||||
|
|
Loading…
Add table
Reference in a new issue