std::experimental::pmr:: new_delete_resource
From cppreference.net
<
cpp
|
experimental
C++
Experimental
| Technical Specification | ||||
| Filesystem library (filesystem TS) | ||||
| Library fundamentals (library fundamentals TS) | ||||
| Library fundamentals 2 (library fundamentals TS v2) | ||||
| Library fundamentals 3 (library fundamentals TS v3) | ||||
| Extensions for parallelism (parallelism TS) | ||||
| Extensions for parallelism 2 (parallelism TS v2) | ||||
| Extensions for concurrency (concurrency TS) | ||||
| Extensions for concurrency 2 (concurrency TS v2) | ||||
| Concepts (concepts TS) | ||||
| Ranges (ranges TS) | ||||
| Reflection (reflection TS) | ||||
| Mathematical special functions (special functions TR) | ||||
| Experimental Non-TS | ||||
| Pattern Matching | ||||
| Linear Algebra | ||||
| std::execution | ||||
| Contracts | ||||
| 2D Graphics |
Polymorphic allocator library
Convenience aliases for containers using
polymorphic_allocator
|
||||
| Memory resource classes | ||||
| Global memory resources | ||||
|
new_delete_resource
|
||||
| Type-erased allocator support for existing classes | ||||
|
ヘッダーで定義
<experimental/memory_resource>
|
||
|
memory_resource
*
new_delete_resource
(
)
noexcept
;
|
(ライブラリ基盤技術仕様) | |
グローバルな
operator new
および
operator delete
を使用してメモリを割り当てる
memory_resource
へのポインタを返します。
戻り値
静的記憶域期間を持つオブジェクトへのポインタ
p
を返します。このオブジェクトの型は
std::experimental::pmr::memory_resource
から派生しており、以下の特性を持ちます:
-
その
allocate()関数はメモリを割り当てるために::operator newを使用します; -
その
deallocate()関数はメモリを解放するために::operator deleteを使用します; -
任意の
memory_resourcerに対して、p->is_equal(r)は&r == pを返します。
この関数が呼び出されるたびに同じ値が返されます。