You copied the Doc URL to your clipboard.

Using the ::operator new function

In accordance with the ISO C++ Standard, the ::operator new(std::size_t) throws an exception when memory allocation fails rather than raising a signal. If the exception is not caught, std::terminate() is called.

The compiler option --force_new_nothrow turns all new calls in a compilation into calls to ::operator new(std::size_t, std::nothrow_t&) or :operator new[](std::size_t, std::nothrow_t&). However, this does not affect operator new calls in libraries, nor calls to any class-specific operator new. See --force_new_nothrow, --no_force_new_nothrow for more information.

Legacy support

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 new_handler to 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.