std::experimental::pmr:: get_default_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 | ||||
|
get_default_resource
|
||||
| Type-erased allocator support for existing classes | ||||
|
memory_resource
*
get_default_resource
(
)
noexcept
;
|
(库基础TS) | |
获取默认内存资源指针。
默认内存资源指针
在未显式提供内存资源时被某些设施使用。初始的默认内存资源指针是
new_delete_resource()
的返回值。
此函数是线程安全的。先前对
set_default_resource
的调用会与后续的
get_default_resource
调用
实现同步
(参见
std::memory_order
)。
返回值
返回默认内存资源指针的值。
参见
设置默认的
memory_resource
(函数) |
|
返回一个静态的、程序级范围的
memory_resource
,该资源使用全局的
operator new
和
operator delete
来分配和释放内存
(函数) |