std::pmr::unsyn...d_pool_resource(3cxx)
π std::pmr::unsynchronized_pool_resource β NAME π
okay so bestie, welcome to std::pmr::unsynchronized_pool_resource β it's a non-thread-safe memory resource that manages pools of fixed-size blocks. that's the whole vibe. it's giving allocator but make it β¨organizedβ¨. this page lives in section 3cxx of the manual, iykyk.
πΈ SYNOPSIS πΈ
#include <memory_resource>
Inherits std::pmr::memory_resource. periodt, that's the parent.
β¨ Public Member Functions β¨
unsynchronized_pool_resource (const pool_options &__opts)β build one with the options you picked out πunsynchronized_pool_resource (const pool_options &__opts, memory_resource *__upstream)β same energy, but you also hand it an upstream resourceunsynchronized_pool_resource (const unsynchronized_pool_resource &)=deleteβ nope, no copying, it's deleted, don't even try πunsynchronized_pool_resource (memory_resource *__upstream)β constructor that just takes the upstream resourcevoid * allocate (size_t __bytes, size_t __alignment=_S_max_align)β gimme memory, and__alignmentdefaults to_S_max_alignvoid deallocate (void *__p, size_t __bytes, size_t __alignment=_S_max_align)β give it back, same default_S_max_alignfor the alignmentbool is_equal (const memory_resource &__other) const noexceptβ compares itself to__other, and it'snoexceptso no dramaunsynchronized_pool_resource & operator= (const unsynchronized_pool_resource &)=deleteβ assignment also deleted, literally cannot be copied intopool_options options () const noexceptβ hands you back thepool_options,noexceptofcvoid release ()β drop everything, free the pools π«Άmemory_resource * upstream_resource () const noexceptβ tells you who the upstream resource is,noexcept
π¦ Protected Member Functions π¦
void * do_allocate (size_t __bytes, size_t __alignment) overrideβ the override that does the actual allocatingvoid do_deallocate (void *__p, size_t __bytes, size_t __alignment) overrideβ the override that does the actual deallocatingbool do_is_equal (const memory_resource &__other) const noexcept overrideβ the override for the equality check,noexcept
π Detailed Description π
A non-thread-safe memory resource that manages pools of fixed-size blocks. like, it pools your fixed-size blocks so you don't have to. main character energy for allocators fr fr. π
Since C++17 β (yes she's been iconic since C++17)
π§ Member Function Documentation π§
π void * std::pmr::unsynchronized_pool_resource::do_allocate (size_t __bytes, size_t __alignment) [override], [protected], [virtual]
Implements std::pmr::memory_resource. that's it, that's the whole note π
but like, important β [override], [protected], [virtual], all three.
π₯ void std::pmr::unsynchronized_pool_resource::do_deallocate (void * __p, size_t __bytes, size_t __alignment) [override], [protected], [virtual]
Implements std::pmr::memory_resource. again, [override], [protected], [virtual] β she's got the full set π
π bool std::pmr::unsynchronized_pool_resource::do_is_equal (const memory_resource & __other) const [inline], [override], [protected], [virtual], [noexcept]
Implements std::pmr::memory_resource. and look at all those tags: [inline], [override], [protected], [virtual], [noexcept] β overachiever, we love to see it π«Ά
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. no human wrote this one, it's a Doxygen girlie π€π
lowkey reminder bestie: non-thread-safe. if multiple threads are gonna touch this, that's a whole different resource, don't come for me π
kisses and bye-byes π¦ this was std::pmr::unsynchronized_pool_resource, from the 3cxx manual β that footer energy is all libstdc++ source-code realness, generated by Doxygen, date vibes courtesy of the libstdc++ docs themselves. slay responsibly π
β¨
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms