__GNU_CXX::BITMAP_ALLOCATOR(3)
β¨ NAME β¨
__gnu_cxx::bitmap_allocator< _Tp > β bestie it's the Bitmap Allocator, primary template. π
This page lives in the Library Functions Manual, and yeah it's one of those fancy C++ header-only situation-ships. π¦
π SYNOPSIS π
okay so first things first, you gotta pull it in:
#include <bitmap_allocator.h>
and heads up, it Inherits __gnu_cxx::free_list. family tree matters, periodt. π³
π Public Types π
__mutex_typeβ atypedefoffree_list::__mutex_type, borrowed from the parent, no capconst_pointerβ atypedefofconst _Tp *const_referenceβ atypedefofconst _Tp &difference_typeβ atypedefofstd::ptrdiff_tpointerβ atypedefof_Tp *propagate_on_container_move_assignmentβ atypedefofstd::true_type, so yes, it propagates π«referenceβ atypedefof_Tp &size_typeβ atypedefofstd::size_tvalue_typeβ atypedefof_Tp
π Public Member Functions π
bitmap_allocator(const bitmap_allocator &)noexceptβ copy constructor, calm and collectedtemplate<typename _Tp1> bitmap_allocator(const bitmap_allocator< _Tp1 > &)noexceptβ the templated copy-adjacent one, also unbotheredpointer _M_allocate_single_object()β Allocates memory for a single object of sizesizeof(_Tp). β¨void _M_deallocate_single_object(pointer __p)throw ()β Deallocates memory that belongs to a single object of sizesizeof(_Tp). π«Άconst_pointer address(const_reference __r) const noexceptpointer address(reference __r) const noexceptpointer allocate(size_type __n)pointer allocate(size_type __n, typename bitmap_allocator< void >::const_pointer)template<typename _Up, typename... _Args> void construct(_Up *__p, _Args &&... __args)void deallocate(pointer __p, size_type __n)throw ()template<typename _Up> void destroy(_Up *__p)size_type max_size() const noexcept
πΈ Detailed Description πΈ
template<typename _Tp>
class __gnu_cxx::bitmap_allocator< _Tp >
"Bitmap Allocator, primary template." that's literally it, that's the whole vibe. π
π Member Function Documentation π
π template<typename _Tp> pointer __gnu_cxx::bitmap_allocator< _Tp >::_M_allocate_single_object () [inline]
Allocates memory for a single object of size sizeof(_Tp). simple as that, bestie.
Exceptions
std::bad_allocβ if memory cannot be allocated. π rude but real.
Complexity: worst case complexity is O(N), but that is hardly ever hit. like, almost never, fr fr. If and when this particular case is encountered, the next few cases are guaranteed to have a worst case complexity of O(1)! that's why this function performs very well on average. you can consider this function to have a complexity referred to commonly as: Amortized Constant time. ate. π₯
π¦ template<typename _Tp> void __gnu_cxx::bitmap_allocator< _Tp >::_M_deallocate_single_object (pointer __p) [inline]
Deallocates memory that belongs to a single object of size sizeof(_Tp).
Complexity: O(lg(N)), but the worst case is not hit often! this is because containers usually deallocate memory close to each other and this case is handled in O(1) time by the deallocate function. iconic behaviour honestly. β
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. so nobody actually hand-wrote this, it's giving robot energy but make it cute. π€π
ok that's the whole page, thanks for reading my ted talk π
this was libstdc++'s __gnu_cxx:...tor< _Tp >(3) page β go forth and allocate, bestie ππ«Ά
π¦ 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