new

标准库标头<new>

此标头是动态内存管理库,特别是提供低级内存管理特征。

功能

*。

运算符新运算符。[分配功能%28功能%29

运算符删除。[]取消分配功能%28功能%29

弄到[医]新[医]处理程序%28C++11%29获得当前新处理程序%28函数%29

集[医]新[医]处理程序注册一个新的处理程序%28函数%29

清洗%28C++17%29指针优化屏障%28功能模板%29

坏[医]内存分配失败时引发的分配异常%28class%29

坏[医]列阵[医]新[医]长度%28C++11%29异常在分配无效长度%28class%29的数组时抛出

无抛[医]用于选择非抛出分配函数%28class%29的t标记类型

对齐[医]瓦尔[医]T%28C++17%29类型用于将对齐传递给对齐感知的分配和去分配函数%28class%29

类型

新[医]新处理程序%28-胡枝子f%29的处理程序函数指针类型

对象

不抛类型的对象[医]t用于选择非抛出分配函数%28常量%29。

硬件[医]破坏性[医]干扰[医]尺寸硬件[医]建设性[医]干扰[医]大小%28C++17%29分钟偏移以避免错误共享最大偏移量以促进真正共享%28常量%29

简介

二次

namespace std { class bad_alloc; class bad_array_new_length; enum class align_val_t : size_t {}; struct nothrow_t { explicit nothrow_t() = default; }; extern const nothrow_t nothrow; using new_handler = void (*)( new_handler get_new_handler() noexcept; new_handler set_new_handler(new_handler new_p) noexcept; template <class T> constexpr T* launder(T* p) noexcept; static constexpr size_t hardware_destructive_interference_size = /*implementation-defined*/ ; static constexpr size_t hardware_constructive_interference_size = /*implementation-defined*/ ; } void* operator new(std::size_t size void* operator new(std::size_t size, std::align_val_t alignment void* operator new(std::size_t size, const std::nothrow_t&) noexcept; void* operator new(std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; void operator delete(void* ptr) noexcept; void operator delete(void* ptr, std::size_t size) noexcept; void operator delete(void* ptr, std::align_val_t alignment) noexcept; void operator delete(void* ptr, std::size_t size, std::align_val_t alignment) noexcept; void operator delete(void* ptr, const std::nothrow_t&) noexcept; void operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; void* operator new[](std::size_t size void* operator new[](std::size_t size, std::align_val_t alignment void* operator new[](std::size_t size, const std::nothrow_t&) noexcept; void* operator new[](std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; void operator delete[](void* ptr) noexcept; void operator delete[](void* ptr, std::size_t size) noexcept; void operator delete[](void* ptr, std::align_val_t alignment) noexcept; void operator delete[](void* ptr, std::size_t size, std::align_val_t alignment) noexcept; void operator delete[](void* ptr, const std::nothrow_t&) noexcept; void operator delete[](void* ptr, std::align_val_t alignment, 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;

二次

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/Header/new