__gnu_cxx::free_list(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 7 versions
, in arch rolling, fedora 43, fedora 44

πŸ’– __gnu_cxx::free_list β€” NAME πŸ’–

okay so bestie, this is the free list class for managing chunks of memory to be given to and returned by the bitmap_allocator. that's the whole vibe. it's from the __gnu_cxx corner of the libstdc++ manual, and she's a lil internal helper doing serious memory work. 🧚✨


✨ SYNOPSIS ✨

#include <bitmap_allocator.h>

so you pull her in with that header, and here's who's inheriting from her:

  • Inherited by __gnu_cxx::bitmap_allocator< _Tp1 > [private], __gnu_cxx::bitmap_allocator< void >, and __gnu_cxx::bitmap_allocator< _Tp > [private]. πŸ‘‘

πŸŽ€ Public Types πŸŽ€

  • typedef __mutex __mutex_type
  • typedef vector_type::iterator iterator
  • typedef std::size_t * value_type
  • typedef __detail::__mini_vector< value_type > vector_type

πŸ¦‹ Public Member Functions πŸ¦‹

  • void _M_clear () β€” this function just clears the internal Free List, and gives back all the memory to the OS. literally the clean-slate moment. πŸ’…
  • std::size_t * _M_get (std::size_t __sz) β€” this function gets a block of memory of the specified size from the free list. it's giving personal shopper. πŸ›οΈ
  • void _M_insert (std::size_t *__addr) throw () β€” this function returns the block of memory to the internal free list. putting it back where it belongs, no cap. 🫢

🌸 Detailed Description 🌸

The free list class for managing chunks of memory to be given to and returned by the bitmap_allocator.

that's it, that's her whole job description, and she does it flawlessly. main character energy only. ⭐


πŸ’œ Member Function Documentation πŸ’œ

void __gnu_cxx::free_list::_M_clear ()

This function just clears the internal Free List, and gives back all the memory to the OS.

like... she hands the RAM back to the operating system, politely, and walks away. iconique. πŸŽ€

std::size_t * __gnu_cxx::free_list::_M_get (std::size_t __sz)

This function gets a block of memory of the specified size from the free list.

Parameters

  • __sz β€” The size in bytes of the memory required.

Returns

A pointer to the new memory block of size at least equal to that requested.

note bestie: at least equal, not exactly. don't be out here assuming you got the exact number you asked for. πŸ™ˆ

void __gnu_cxx::free_list::_M_insert (std::size_t * __addr) [inline]

This function returns the block of memory to the internal free list.

Parameters

  • __addr β€” The pointer to the memory block that was given by a call to the _M_get function.
fr fr, only feed her back a pointer that _M_get handed you. that's the deal. πŸ”₯

Referenced by __gnu_cxx::bitmap_allocator< _Tp1 >::_M_deallocate_single_object().


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.


and that's the whole page, bestie 🫢 this one's __gnu_cxx::free_list from the libstdc++ manual β€” straight out of the libstdc++ docs, Doxygen-generated and everything. go forth and allocate responsibly, mwah πŸ’–βœ¨πŸŒˆ

πŸ“¦ 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 43: libstdc++-docs 15.2.1-2.fc43 Β· 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 43: libstdc++-docs 15.3.1-1.fc43 Β· 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.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