__GNU_CXX::MALLOC_ALLOCATOR(3)

πŸ’– NAME πŸ’–

__gnu_cxx::malloc_allocator< _Tp > β€” an allocator that uses malloc. that's it, that's the whole vibe bestie 🫢


✨ SYNOPSIS ✨

okay so first things first, you gotta pull her in:

#include <malloc_allocator.h>

🌸 Public Types 🌸

the little typedef besties, no cap:

  • typedef std::ptrdiff_t difference_type
  • typedef std::true_type propagate_on_container_move_assignment
  • typedef std::size_t size_type
  • typedef _Tp value_type

πŸŽ€ Public Member Functions πŸŽ€

the actual moves she makes:

  • constexpr malloc_allocator (const malloc_allocator &) noexcept
  • template<typename _Tp1> constexpr malloc_allocator (const malloc_allocator< _Tp1 > &) noexcept
  • _Tp * allocate (size_type __n, const void *=0)
  • void deallocate (_Tp *__p, size_type)

πŸ¦‹ Friends πŸ¦‹

she keeps her circle small, iconic behavior:

  • template<typename _Up> constexpr bool operator== (const malloc_allocator &, const malloc_allocator< _Up > &) noexcept

πŸ‘‘ Detailed Description πŸ‘‘

template<typename _Tp>
class __gnu_cxx::malloc_allocator< _Tp >

"An allocator that uses malloc."

bestie this is precisely the allocator defined in the C++ Standard. like, she's not doing anything extra, she's not doing anything weird, she is the blueprint. main character energy fr fr. πŸ’…

the way that she works:

  • all allocation calls malloc 🌈
  • all deallocation calls free ⭐

that's the whole personality. she mallocs, she frees. simple. elegant. ate. πŸ”₯


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libstdc++ from the source code. not a human, just a robot doing her little thing πŸ€–βœ¨


okay that's the whole page bestie, mwah πŸ’– this one came from libstdc++, and the page title is __gnu_cxx:...tor< _Tp >(3) β€” the (3) means she's a library function, iykyk. go forth and malloc 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