std::experi...lt_resource(3)
okay so this is the std::experi...lt_resource(3) page, and it lives in the C++ Standard Libary manual π
(yes, thatβs the manual name, iykyk). Weβre talking about std::experimental::pmr::set_default_resource, and itβs giving very βsmall function, big responsibilityβ energy π
π NAME π
std::experimental::pmr::set_default_resource β std::experimental::pmr::set_default_resource
β¨ Synopsis β¨
Defined in header <experimental/memory_resource>
memory_resource* set_default_resource( memory_resource* r (library fundamentals TS)
) noexcept;
If r is not null, this sets the default memory resource pointer to r; otherwise, it sets the default memory resource pointer to new_delete_resource(). π
The default memory resource pointer is used by certain facilities when an explicit memory resource is not supplied. The initial default memory resource pointer is the return value of new_delete_resource(). πΈ
This function is thread-safe. Every call to set_default_resource synchronizes with (see std::memory_order) the subsequent set_default_resource and get_default_resource calls. π₯
π«Ά Return value π«Ά
It returns the previous value of the default memory resource pointer. Thatβs the whole return value, bestie π
π See also π
get_default_resourceβ gets the defaultmemory_resource(function)new_delete_resourceβ returns a static program-widememory_resourcethat uses the globaloperator newandoperator deleteto allocate and deallocate memory (function)
π·οΈ Category π·οΈ
Noindexed pages
xoxo, your Unix bestie π β source/version: http://cppreference.com, date: 2024.06.10
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms