mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-11 17:59:31 +03:00
Support -fno-exceptions
This commit is contained in:
parent
817569dfad
commit
5a4f0d3cb4
1 changed files with 4 additions and 0 deletions
|
@ -803,7 +803,11 @@ static bool mi_try_new_handler(bool nothrow) {
|
||||||
if (h==NULL) {
|
if (h==NULL) {
|
||||||
_mi_error_message(ENOMEM, "out of memory in 'new'");
|
_mi_error_message(ENOMEM, "out of memory in 'new'");
|
||||||
if (!nothrow) {
|
if (!nothrow) {
|
||||||
|
#ifdef __EXCEPTIONS
|
||||||
throw std::bad_alloc();
|
throw std::bad_alloc();
|
||||||
|
#else
|
||||||
|
abort();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue