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 &)=delete
  • synchronized_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 noexcept
  • synchronized_pool_resource & operator= (const synchronized_pool_resource &)=delete
  • pool_options options () const noexcept
  • void release ()
  • memory_resource * upstream_resource () const noexcept

πŸŽ€ Protected Member Functions πŸŽ€

  • void * do_allocate (size_t __bytes, size_t __alignment) override
  • void do_deallocate (void *__p, size_t __bytes, size_t __alignment) override
  • bool 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 of std::pmr::memory_resource implementation. 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