std::experi...ce::allocate(3)
π std::experi...ce::allocate(3) π
okay so bestie, this page is from the C++ Standard Libary manual β yes, βLibary,β exactly like that, iykyk β and weβre about to make std::experimental::pmr::memory_resource::allocate make sense. no cap. β¨
β¨ NAME β¨
std::experimental::pmr::memory_resource::allocate β std::experimental::pmr::memory_resource::allocate. yep, the function and the page have the exact same name, and honestly? iconic π
π¦ Synopsis π¦
void* allocate( std::size_t bytes, std::size_t alignment (library
fundamentals TS)
= alignof(std::max_align_t) );
This one is the (library fundamentals TS) version, periodt.
It allocates storage with a size of at least bytes bytes. the returned storage is aligned to the specified alignment if that alignment is supported, and to alignof(std::max_align_t) otherwise. πΈ
Itβs equivalent to return do_allocate(bytes, alignment);. literally that. π«Ά
π Exceptions π
It throws an exception if storage of the requested size and alignment cannot be obtained. no storage? no vibes. it throws. π
π₯ See also π₯
do_allocateallocates memory[virtual](virtual protected member function)
π·οΈ Category π·οΈ
Noindexed pages
source/version/date tea β: http://cppreference.com, 2024.06.10, and the footer tag std::experi...ce::allocate(3) β signed, sealed, slayed. π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms