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
;
|
(라이브러리 펀더멘털 TS) | |
전역
operator new
와
operator delete
를 사용하여 메모리를 할당하는
memory_resource
에 대한 포인터를 반환합니다.
반환값
다음 속성을 가진,
std::experimental::pmr::memory_resource
에서 파생된 타입의 정적 저장 기간 객체에 대한 포인터
p
를 반환합니다:
-
해당
allocate()함수는 메모리 할당을 위해::operator new를 사용합니다; -
해당
deallocate()함수는 메모리 해제를 위해::operator delete를 사용합니다; -
모든
memory_resourcer에 대해,p->is_equal(r)는&r == p를 반환합니다.
이 함수가 호출될 때마다 동일한 값이 반환됩니다.