Standard C++ Library Reference ISO/IEC (VERSION3)

The third function is called by a placement delete expression corresponding to a new expression of the
form new(std::size_t, const std::nothrow_t&). The program can define a function with
this function signature that replaces the default version defined by the Standard C++ library. The required
behavior is to accept a value of ptr that is null or that was returned by an earlier call to operator
new(size_t). The default behavior is to evaluate delete(ptr).
operator delete[]
void operator delete[](void *ptr) throw(); // REPLACEABLE
void operatordelete[](void *, void *) throw();
void operatordelete[](void *ptr, // REPLACEABLE
const std::nothrow_t&) throw();
The first function is called by a delete[] expression to render the value of ptr invalid. The program
can define a function with this function signature that replaces the default version defined by the Standard
C++ library.
The required behavior is to accept a value of ptr that is null or that was returned by an earlier call to
operator new[](size_t).
The default behavior for a null value of ptr is to do nothing. Any other value of ptr must be a value
returned earlier by a call as described above. The default behavior for such a non-null value of ptr is to
reclaim storage allocated by the earlier call. It is unspecified under what conditions part or all of such
reclaimed storage is allocated by a subsequent call to operator new(size_t), or to any of
calloc(size_t), malloc(size_t), or realloc(void*, size_t).
The second function is called by a placement delete[] expression corresponding to a new[]
expression of the form new[](std::size_t). It does nothing.
The third function is called by a placement delete expression corresponding to a new[] expression of
the form new[](std::size_t, const std::nothrow_t&). The program can define a
function with this function signature that replaces the default version defined by the Standard C++ library.
The required behavior is to accept a value of ptr that is null or that was returned by an earlier call to
operator new[](size_t). The default behavior is to evaluate delete[](ptr).
operator new
void *operator new(std::size_t count) throw(bad_alloc); // REPLACEABLE
void *operator new(std::size_t count, // REPLACEABLE
const std::nothrow_t&) throw();
void *operator new(std::size_t count, void *ptr) throw();
The first function is called by a new expression to allocate count bytes of storage suitably aligned to
represent any object of that size. The program can define a function with this function signature that
replaces the default version defined by the Standard C++ library.
The required behavior is to return a non-null pointer only if storage can be allocated as requested. Each
such allocation yields a pointer to storage disjoint from any other allocated storage. The order and