An allocation function shall be a class member function or a global
function; a program is ill-formed if an allocation function is declared
in a namespace scope other than global scope or declared static in
The allocation function attempts to allocate the requested amount of
If it is successful, it shall return the address of the start
of a block of storage whose length in bytes shall be at least as large
as the requested size.
There are no constraints on the contents of the
allocated storage on return from the allocation function.
contiguity, and initial value of storage allocated by successive calls
to an allocation function are unspecified.
The pointer returned shall be
suitably aligned so that it can be converted to a pointer to any
suitable complete object type ([new.delete.single])
and then used to access the object or array in the
storage allocated (until the storage is explicitly deallocated by a call
to a corresponding deallocation function).
Even if the size of the space
requested is zero, the request can fail.
If the request succeeds, the
value returned shall be a non-null pointer value ([conv.ptr])
p0 different from any previously returned value p1,
unless that value p1 was subsequently passed to an
Furthermore, for the library allocation functions
in [new.delete.single] and [new.delete.array],
p0 shall represent the address of a block of storage disjoint from the storage
for any other object accessible to the caller.
The effect of indirecting through a pointer
returned as a request for zero size is undefined.38
A global allocation function is only called as the result of a new
expression, or called directly using the function call
syntax, or called indirectly through calls to the
functions in the C++ standard library.