std::experi...::deallocate(3)
okay bestie, welcome to the std::experi...::deallocate(3) page from the C++ Standard Libary manual β yes, that manual name is literally right there, tucked in like a lil name tag. This one is all about std::experimental::pmr::memory_resource::deallocate, and it is lowkey iconic for being extremely specific about when you're allowed to call it. π«Ά
β¨ NAME β¨
std::experimental::pmr::memory_resource::deallocate β and the name again, because the original said it twice and we are not skipping: std::experimental::pmr::memory_resource::deallocate.
πΈ Synopsis πΈ
Here's the signature, copied exactly with all its little details:
void* deallocate( void* p, std::size_t bytes, std::size_t alignment = alignof(std::max_align_t) );
(library fundamentals TS)
deallocate deallocates the storage pointed to by p. No cap, that's the whole job. π§Ή
Now the rules, bestie, because this is one of those functions with requirements and they are not vibes-based: p shall have been returned by a prior call to allocate(bytes, alignment) on a memory_resource that compares equal to *this, and the storage it points to shall not yet have been deallocated. Periodt. π
Equivalent to return do_deallocate(p, bytes, alignment);.
π Exceptions π
Throws nothing. Not a single exception. It is giving calm, unbothered, zero-drama energy. π
π See also π
do_deallocateβ deallocates memory;[virtual](virtual protected member function). This is the other lil guy in the story. π¦
π·οΈ Category π·οΈ
Noindexed pages
mwah π β page pulled from http://cppreference.com, version/date 2024.06.10, and yeah, the page name is std::experi...::deallocate(3). bye bestie! π
π¦ 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