Defined in header
<memory_resource> | ||
---|---|---|
class synchronized_pool_resource : public std::pmr::memory_resource; | (since C++17) |
The class std::pmr::synchronized_pool_resource
is a general-purpose memory resource class with the following properties:
deallocate
has not been called for some of the allocated blocks. do_allocate
are dispatched to the pool serving the smallest blocks accommodating the requested size. std::pmr::pool_options
struct to its constructor. synchronized_pool_resource
may be accessed from multiple threads without external synchronization, and may have thread-specific pools to reduce synchronization costs. If the memory resource is only accessed from one thread, unsynchronized_pool_resource
is more efficient.
Constructs a synchronized_pool_resource (public member function) |
|
[virtual]
| Destroys a synchronized_pool_resource , releasing all allocated memory (virtual public member function) |
operator=
[deleted]
| Copy assignment operator is deleted. synchronized_pool_resource is not copy assignable (public member function) |
Public member functions |
|
Release all allocated memory (public member function) |
|
Returns a pointer to the upstream memory resource (public member function) |
|
Returns the options that control the pooling behavior of this resource (public member function) |
|
Protected member functions |
|
[virtual]
| Allocate memory (virtual protected member function) |
[virtual]
| Return memory to the pool (virtual protected member function) |
[virtual]
| Compare for equality with another memory_resource (virtual protected member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/memory/synchronized_pool_resource