__GNU_CXX::__POOL_ALLOC(3cxx)
Bestie, welcome to the 3cxx manual page for __gnu_cxx::__pool_alloc< _Tp > π We're doing the whole thing, no skips, no cap.
πΈ NAME πΈ
__gnu_cxx::__pool_alloc< _Tp > β an allocator that uses a memory pool with a single lock. That's the name-and-game, periodt. β¨
π¦ SYNOPSIS π¦
Start with this include, bestie:
#include <pool_allocator.h>
Also important: it inherits __gnu_cxx::__pool_alloc_base. Keeping the inheritance receipts, always. π§Ύ
π Public Types π
typedef const _Tp * const_pointerβ a pointer that points at aconst _Tp.typedef const _Tp & const_referenceβ a reference to aconst _Tp.typedef std::ptrdiff_t difference_typeβ the difference type isstd::ptrdiff_t.typedef _Tp * pointerβ a pointer to_Tp.typedef std::true_type propagate_on_container_move_assignmentβ this one is literallystd::true_type.typedef _Tp & referenceβ a reference to_Tp.typedef std::size_t size_typeβ the size type isstd::size_t.typedef _Tp value_typeβ the value type is_Tp.
π Public Member Functions π
__pool_alloc (const __pool_alloc &) noexceptβ copy constructor, and it'snoexcept.template<typename _Tp1 > __pool_alloc (const __pool_alloc< _Tp1 > &) noexceptβ converting constructor template from__pool_alloc< _Tp1 >, alsonoexcept.const_pointer address (const_reference __x) const noexceptβ constaddressoverload, returnsconst_pointer,noexcept.pointer address (reference __x) const noexceptβ non-const-referenceaddressoverload, returnspointer,noexcept.pointer allocate (size_type __n, const void *=0)β allocates usingsize_type __n, and that second parameter defaults to0.template<typename _Up , typename... _Args> void construct (_Up *__p, _Args &&... __args)β variadicconstructfor a_Up *__pand_Args &&... __args.void deallocate (pointer __p, size_type __n)β deallocatespointer __pwithsize_type __n.template<typename _Up > void destroy (_Up *__p)β templatedestroyfor a_Up *__p.size_type max_size () const noexceptβ returnssize_type, and yes bestie, it'sconst noexcept.
β¨ Detailed Description β¨
Template time:
template<typename _Tp>
class __gnu_cxx::__pool_alloc< _Tp >
And the description is right there: an allocator using a memory pool with a single lock. That's the whole iconic little class. π
π«Ά Author π«Ά
Generated automatically by Doxygen for libstdc++ from the source code. So it's not a human author moment, it's Doxygen doing its thing. π
Sign-off: source/version energy is libstdc++, manual section 3cxx; the original footer doesn't give a date, so there's no date to spill. Mwah πβ¨
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms