Allocators(3)

πŸ“¦ version 4.4.0, in nixpkgs unstable

πŸ’– NAME πŸ’–

Bestie, welcome to Allocators(3) from the Library Functions Manual β€” this is the libstdc++ allocator lineup and it’s highkey giving β€œclasses encapsulating memory operations” with full main character energy ✨ Vibe check: passed, it ate, no cap πŸ’…

Allocators -

πŸ¦‹ Classes πŸ¦‹

  • class __gnu_cxx::__mt_alloc< _Tp, _Poolp > β€” okay so this is a fixed size (power of 2) allocator which - when compiled with thread support - will maintain one freelist per size per thread plus a 'global' one. Steps are taken to limit the per thread freelist sizes (by returning excess back to the 'global' list). Further details: http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch32.html. " β€” yes, the stray quote is part of the source vibe, no cap πŸ’€
  • class __gnu_cxx::__pool_alloc< _Tp > β€” Allocator using a memory pool with a single lock. πŸŽ€
  • class __gnu_cxx::_ExtPtr_allocator< _Tp > β€” An example allocator which uses a non-standard pointer type. This allocator specifies that containers use a 'relative pointer' as it's pointer type. (See ext/pointer.h) Memory allocation in this example is still performed using std::allocator. " β€” another stray quote, keeping the lore intact πŸ™ˆ
  • class __gnu_cxx::array_allocator< _Tp, _Array > β€” An allocator that uses previously allocated memory. This memory can be externally, globally, or otherwise allocated. 🌸
  • class __gnu_cxx::bitmap_allocator< _Tp > β€” Bitmap Allocator, primary template. πŸ”₯
  • class __gnu_cxx::debug_allocator< _Alloc > β€” A meta-allocator with debugging bits, as per [20.4]. This is precisely the allocator defined in the C++ Standard. Literally:
    • all allocation calls operator new
    • all deallocation calls operator delete. " β€” yep, another stray quote, she’s iconic πŸ’…
  • class __gnu_cxx::malloc_allocator< _Tp > β€” An allocator that uses malloc. This is precisely the allocator defined in the C++ Standard. Fr fr:
    • all allocation calls malloc
    • all deallocation calls free. " β€” stray quote number whatever, we keep it 🫢
  • class __gnu_cxx::new_allocator< _Tp > β€” An allocator that uses global new, as per [20.4]. This is precisely the allocator defined in the C++ Standard. Ngl:
    • all allocation calls operator new
    • all deallocation calls operator delete. " β€” another one, slay 😭
  • class __gnu_cxx::throw_allocator< T > β€” Allocator class with logging and exception control. ✨
  • class std::allocator< _Tp > β€” The 'standard' allocator, as per [20.4]. Further details: http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html. " β€” the final stray quote, periodt πŸ’–

🌈 Detailed Description 🌈

Classes encapsulating memory operations. That’s the whole detailed description, bestie β€” the way that this page wraps up memory operations is lowkey iconic, and we’re obsessed πŸ¦‹

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not me thinking Doxygen is the main character here πŸ€–πŸ’–

Signed with love by libstdc++, dated 21 Apr 2009 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from