std::experimental::pmr::monotonic_buffer_resource (3) - Linux Manuals

std::experimental::pmr::monotonic_buffer_resource: std::experimental::pmr::monotonic_buffer_resource

NAME

std::experimental::pmr::monotonic_buffer_resource - std::experimental::pmr::monotonic_buffer_resource

Synopsis


Defined in header <experimental/memory_resource>
class monotonic_buffer_resource : public memory_resource; (library fundamentals TS)


The class std::experimental::pmr::monotonic_buffer_resource is an special-purpose memory resource class that releases the allocated memory only when the resource is destroyed. It is intended for very fast memory allocations in situations where memory is used to build up a few objects and then is released all at once.
monotonic_buffer_resource can be constructed with an initial buffer. If there is no initial buffer, or if the buffer is exhausted, additional buffers are obtained from an upstream memory resource supplied at construction. The size of buffers obtained follows a geometric progression.
monotonic_buffer_resource is not thread-safe.

Member functions


                  Constructs a monotonic_buffer_resource
constructor (public member function)


destructor Destroys a monotonic_buffer_resource, releasing all allocated memory
                  (virtual public member function)
[virtual]


operator= Copy assignment operator is deleted. monotonic_buffer_resource is not copy assignable
                  (public member function)
[deleted]

Public member functions


                  Release all allocated memory
release (public member function)
                  Returns a pointer to the upstream memory resource
upstream_resource (public member function)

Protected member functions


do_allocate Allocate memory
                  (virtual protected member function)
[virtual]


do_deallocate No-op
                  (virtual protected member function)
[virtual]


do_is_equal Compare for equality with another memory_resource
                  (virtual protected member function)
[virtual]