new

This header is part of the dynamic memory management library, in particular provides low level memory management features.

Functions
allocation functions
(function)
deallocation functions
(function)
obtains the current new handler
(function)
registers a new handler
(function)
Classes
exception thrown when memory allocation fails
(class)
exception thrown on allocation of array with invalid length
(class)
tag type used to select an non-throwing allocation function
(class)
Types
function pointer type of the new handler
(typedef)
Objects
an object of type nothrow_t used to select an non-throwing allocation function
(constant)

Synopsis

namespace std {
    class bad_alloc;
    class bad_array_new_length;
    struct nothrow_t {};
    extern const nothrow_t nothrow;
    typedef void (*new_handler)();
    new_handler get_new_handler() noexcept;
    new_handler set_new_handler(new_handler new_p) noexcept;
}
 
void* operator new(std::size_t size);
void* operator new(std::size_t size, const std::nothrow_t&) noexcept;
void  operator delete(void* ptr) noexcept;
void  operator delete(void* ptr, const std::nothrow_t&) noexcept;
void* operator new[](std::size_t size);
void* operator new[](std::size_t size, const std::nothrow_t&) noexcept;
void  operator delete[](void* ptr) noexcept;
void  operator delete[](void* ptr, const std::nothrow_t&) noexcept;
 
void* operator new  (std::size_t size, void* ptr) noexcept;
void* operator new[](std::size_t size, void* ptr) noexcept;
void operator delete (void* ptr, void*) noexcept;
void operator delete[](void* ptr, void*) noexcept;
doc_CPP
2016-10-11 09:59:16
Comments
Leave a Comment

Please login to continue.