std::pmr::m..._deallocate(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

std::pmr::memory_resource::do_deallocate β€” yep, that's the name, and the NAME section says it again: std::pmr::memory_resource::do_deallocate. This page lives in the C++ Standard Libary manual under the shortened title std::pmr::m..._deallocate(3) ✨.

✨ Synopsis ✨

okay so the whole vibe is this virtual function, and it's been around since C++17 (since C++17) πŸŽ€:

virtual void do_deallocate( void* p, std::size_t bytes, std::size_t alignment ) = 0;

The actual job: deallocates the storage pointed to by p. πŸ’…

⚠️ caveat, bestie: p must 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 must not yet have been deallocated, otherwise the behavior is undefined. That's the scary one. πŸ’€

😭 Exceptions 😭

Throws nothing. Not a single exception. Absolutely nothing. 🫢

πŸ‘€ See also πŸ‘€

  • deallocate β€” deallocates memory (public member function)

mwah πŸ’‹ β€” this cutie came from http://cppreference.com, version/date 2024.06.10, page std::pmr::m..._deallocate(3). πŸ¦‹

πŸ“¦ where this page comes from