nWhen new cannot allocate the requested memory, it calls a default callback function from the standard library called new_handler.
nThis function throws an exception of type bad_alloc.
nBy registering a callback function, our own can
be called instead of new_handler.
nThis can be done by calling the function set_new_handler.
nThis function takes one argument: a pointer to a function that takes no arguments and returns void.
nIt returns a pointer to the previous callback, which
is initially the
default (new_handler).