std::pmr::synch...d_pool_resource(3cxx)
π std::pmr::synchronized_pool_resource π
okay bestie, welcome to the 3cxx manual page for std::pmr::synchronized_pool_resource β straight out of libstdc++, and no cap, this one's lowkey iconic. β¨
πΈ NAME πΈ
std::pmr::synchronized_pool_resource β a thread-safe memory resource that manages pools of fixed-size blocks. π
π¦ SYNOPSIS π¦
#include <memory_resource>
Inherits std::pmr::memory_resource.
β¨ Public Member Functions β¨
synchronized_pool_resource (const pool_options &__opts)synchronized_pool_resource (const pool_options &__opts, memory_resource *__upstream)synchronized_pool_resource (const synchronized_pool_resource &)=deletesynchronized_pool_resource (memory_resource *__upstream)void * allocate (size_t __bytes, size_t __alignment=_S_max_align)void deallocate (void *__p, size_t __bytes, size_t __alignment=_S_max_align)bool is_equal (const memory_resource &__other) const noexceptsynchronized_pool_resource & operator= (const synchronized_pool_resource &)=deletepool_options options () const noexceptvoid release ()memory_resource * upstream_resource () const noexcept
π Protected Member Functions π
void * do_allocate (size_t __bytes, size_t __alignment) overridevoid do_deallocate (void *__p, size_t __bytes, size_t __alignment) overridebool do_is_equal (const memory_resource &__other) const noexcept override
π₯ Detailed Description π₯
A thread-safe memory resource that manages pools of fixed-size blocks.
the way that it's thread-safe?? we LOVE a resource that plays nice with everyone and doesn't start drama between threads π«Ά
Since
C++17 β yes bestie, she's been that girl for a minute. π
π Member Function Documentation π
π void * std::pmr::synchronized_pool_resource::do_allocate (size_t __bytes, size_t __alignment) [override], [protected], [virtual]
Implements std::pmr::memory_resource.
π void std::pmr::synchronized_pool_resource::do_deallocate (void * __p, size_t __bytes, size_t __alignment) [override], [protected], [virtual]
Implements std::pmr::memory_resource.
π bool std::pmr::synchronized_pool_resource::do_is_equal (const memory_resource & __other) const [inline], [override], [protected], [virtual], [noexcept]
Implements std::pmr::memory_resource.
these three are the protected girlies β they're doing the actual work behind the scenes so the public API can be the main character.do_allocate,do_deallocate,do_is_equal: the holy trinity ofstd::pmr::memory_resourceimplementation. periodt. π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. π€β¨ (yes she was born from a doc generator and she still ate, we don't discuss it)
and that's the whole page bestie!! π this was libstdc++'s std::pmr::synchronized_pool_resource in section 3cxx β go forth and pool those fixed-size blocks responsibly, ily, mwah ππΈπ¦
π¦ where this page comes from
- ubuntu resolute: libstdc++-13-doc 13.4.0-10ubuntu1
- ubuntu stonking: libstdc++-13-doc 13.5.0-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms