diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2020-09-17 17:59:08 +0200 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2020-09-17 20:02:03 +0200 |
commit | 1a885ce890219213ac24c00d5aededa88c122fe1 (patch) | |
tree | 3295388161d93c8b8d84fda7950345502ea97a37 /libraries/Bridge | |
parent | 6e0fb1ee25efa07be5aef320501f3908f44e5b79 (diff) |
Optionally let new terminate on allocation failure
This is currently disabled, keeping the old behavior of returning
NULL on failure, but should probably be enabled in the future as code
that does want to do a null check has had a chance to switch to the
more portable nothrow versions.
When enabled, allocation failure calls the weak `std::terminate()`,
which calls `abort()` by default, but can be replaced by user code to do
more specific handling.
To enable this, a macro must be defined (in new.cpp or on the compiler
commandline).
This fixes part of #287.
Diffstat (limited to 'libraries/Bridge')
0 files changed, 0 insertions, 0 deletions