Files
2025-10-25 03:02:53 +03:00

1.9 KiB

[mem.res.public]

20 Memory management library [mem]

20.5 Memory resources [mem.res]

20.5.2 Class memory_resource [mem.res.class]

20.5.2.2 Public member functions [mem.res.public]

🔗

~memory_resource();

1

#

Effects: Destroys this memory_resource.

🔗

void* allocate(size_t bytes, size_t alignment = max_align);

2

#

Effects: Allocates storage by calling do_allocate(bytes, alignment) and implicitly creates objects within the allocated region of storage.

3

#

Returns: A pointer to a suitable created object ([intro.object]) in the allocated region of storage.

4

#

Throws: What and when the call to do_allocate throws.

🔗

void deallocate(void* p, size_t bytes, size_t alignment = max_align);

5

#

Effects: Equivalent to do_deallocate(p, bytes, alignment).

🔗

bool is_equal(const memory_resource& other) const noexcept;

6

#

Effects: Equivalent to: return do_is_equal(other);