21
Language support library
[language.support]
21.6
Dynamic memory management
[support.dynamic]
21.6.3
Storage allocation errors
[alloc.errors]
21.6.3.3
Type
new_handler
[new.handler]
using new_handler = void (*)();
1
#
The type of a
handler function
to be called by
operator new()
or
operator new[]()
(
[new.delete]
) when they cannot satisfy a request for additional storage
.
2
#
Required behavior:
A
new_handler
shall perform one of the following:
(2.1)
make more storage available for allocation and then return;
(2.2)
throw an exception of type
bad_alloc
or a class derived from
bad_alloc
;
(2.3)
terminate execution of the program without returning to the caller
.