In accordance with the ISO C++ Standard, the
new(std::size_t) throws an exception when memory allocation
fails rather than raising a signal. If the exception is not caught,
The compiler option
all new calls in a compilation into calls to
new(std::size_t, std::nothrow_t&) or
new(std::size_t, std::nothrow_t&). However, this
does not affect
operator new calls in libraries,
nor calls to any class-specific
See --force_new_nothrow, --no_force_new_nothrow for more
In RVCT v2.0, when the
::operator new function
ran out of memory, it raised the signal SIGOUTOFHEAP,
instead of throwing a C++ exception. See ISO-compliant
implementation of signals supported by the signal() function in
the C library and additional type arguments in Using
ARM C and C++ Libraries and Floating-Point Support.
In the current release, it is possible to install a
raise a signal and so restore the RVCT v2.0 behavior.
Do not rely on the implementation details of this behavior, because it might change in future releases.