Replacement Functions

If replacement definition occurs prior to the program startup then replacement functions are allowed.

A C++ program may provide the definition for any of eight dynamic memory allocation function signatures declared in header <new>.

Listing: Dynamic Memory Allocators
operator new(size_t)
operator new(size_t, const std::nothrow_t&)

operator new[](size_t)

operator new[](size_t, const std::nothrow_t&)

operator delete(void*)

operator delete(void*, const std::nothrow_t&)

operator delete[](void*)

operator delete[](void*, const std::nothrow_t&)