Namespaces
Variants
Views
Actions

Low level memory management

From cppreference.com
< cpp‎ | memory
Revision as of 08:24, 13 June 2018 by Cubbi (Talk | contribs)

 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Dynamic memory management
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Allocators
Garbage collection support
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)



 
 

The new-expression is the only way to create an object or an array of objects with dynamic storage duration, that is, with lifetime not restricted to the scope in which it is created. A new-expression obtains storage by calling an allocation function. A delete-expression destroys a most derived object or an array created by a new-expression and calls the deallocation function. The default allocation and deallocation functions, along with related functions, types, and objects, are declared in the header <new>.

Defined in header <new>

Contents

Functions
allocation functions
(function) [edit]
deallocation functions
(function) [edit]
obtains the current new handler
(function) [edit]
registers a new handler
(function) [edit]
Classes
exception thrown when memory allocation fails
(class) [edit]
exception thrown on allocation of array with invalid length
(class) [edit]
tag type used to select a non-throwing allocation function
(class) [edit]
type used to pass alignment to alignment-aware allocation and deallocation functions
(enum) [edit]
tag type used to identify destroying-delete overloads of operator delete
(class) [edit]
Types
function pointer type of the new handler
(typedef) [edit]
Objects
a tag used to select a non-throwing allocation function
(tag)[edit]