__GNU_CXX::__POOL_ALLOC(3)
π NAME π
ok so bestie, welcome to __gnu_cxx::__pool_alloc< _Tp > β it's an allocator that uses a memory pool with a single lock. that's it, that's the whole vibe. it's from the __gnu_cxx library (you know, the GNU extensions zone) and the manual is a Library Functions Manual situation, section 3. π§
β¨ SYNOPSIS β¨
#include <pool_allocator.h>
it inherits __gnu_cxx::__pool_alloc_base. yes queen, it's got a whole base class. π
π Public Types π
here's the whole type roster, no skips:
typedef const _Tp * const_pointertypedef const _Tp & const_referencetypedef std::ptrdiff_t difference_typetypedef _Tp * pointertypedef std::true_type propagate_on_container_move_assignmenttypedef _Tp & referencetypedef std::size_t size_typetypedef _Tp value_type
likeβ¦ the full set. pointer, reference, const_pointer, const_reference, sizes, difference type, value type, and propagate_on_container_move_assignment set to std::true_type. iconic behavior honestly. π
π¦ Public Member Functions π¦
every single one, verbatim, because we don't gatekeep:
__pool_alloc (const __pool_alloc &) noexcepttemplate<typename _Tp1> __pool_alloc (const __pool_alloc< _Tp1 > &) noexceptconst_pointer address (const_reference __x) const noexceptpointer address (reference __x) const noexceptpointer allocate (size_type __n, const void *=0)template<typename _Up, typename... _Args> void construct (_Up *__p, _Args &&... __args)void deallocate (pointer __p, size_type __n)template<typename _Up> void destroy (_Up *__p)size_type max_size () const noexcept
so you got your copy constructor, your converting template constructor (both noexcept, love that for them), two address overloads β one const, one not β then the classic allocate / construct / deallocate / destroy squad, and max_size () const noexcept at the end. the whole allocation lifecycle, served. π
π Detailed Description π
template<typename _Tp>
class __gnu_cxx::__pool_alloc< _Tp >
"Allocator using a memory pool with a single lock."
that's the official description, word for word, and it's lowkey the whole point: it's a template class over _Tp, and it allocates out of a memory pool guarded by one single lock. one lock. not a million. π«Ά
πΈ Author πΈ
Generated automatically by Doxygen for libstdc++ from the source code. so nobody hand-wrote this, it's the robot doing its thing. π€
ok bestie that's the whole page, tysm for reading π₯° this was libstdc++ documenting __gnu_cxx::__pool_alloc< _Tp > in section 3, fr fr. mwah, go allocate something responsibly. πβ¨π
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms