std::experi...do_allocate(3)

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

πŸ’– std::experi...do_allocate(3) πŸ’–

okay bestie, this page is from the C++ Standard Libary manual, and it’s giving pure-virtual allocation energy. No cap. Here’s the whole thing, with zero facts dropped. 🫢

✨ NAME ✨

std::experimental::pmr::memory_resource::do_allocate β€” and yes, the page says it again: std::experimental::pmr::memory_resource::do_allocate.

πŸ“ Synopsis πŸ“

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

This is the (library fundamentals TS) version, just so you know. ✨

Allocates storage with a size of at least bytes bytes. The returned storage is aligned to the specified alignment if such alignment is supported, and to alignof(std::max_align_t) otherwise.

alignment shall be a power of two. That’s the rule, bestie β€” not a vibe suggestion. πŸ’…

πŸ’₯ Exceptions πŸ’₯

Throws an exception if storage of the requested size and alignment cannot be obtained. So if it can’t get the goods, it throws. Periodt. 😭

πŸ‘€ See also πŸ‘€

  • allocate allocates memory (public member function)

🏷️ Category 🏷️

  • Noindexed pages

this iconic page comes from source/version http://cppreference.com and is dated 2024.06.10 β€” mwah πŸ’‹

πŸ“¦ where this page comes from