[mem.res.monotonic.buffer.ctor] (original) (raw)
20 Memory management library [mem]
20.5 Memory resources [mem.res]
20.5.6 Class monotonic_buffer_resource [mem.res.monotonic.buffer]
20.5.6.2 Constructors and destructor [mem.res.monotonic.buffer.ctor]
explicit monotonic_buffer_resource(memory_resource* upstream); monotonic_buffer_resource(size_t initial_size, memory_resource* upstream);
Preconditions: upstream is the address of a valid memory resource.
initial_size, if specified, is greater than zero.
Effects: Sets upstream_rsrc to upstream andcurrent_buffer to nullptr.
If initial_size is specified, sets next_buffer_size to at least initial_size; otherwise sets next_buffer_size to animplementation-defined size.
monotonic_buffer_resource(void* buffer, size_t buffer_size, memory_resource* upstream);
Preconditions: upstream is the address of a valid memory resource.
buffer_size is no larger than the number of bytes in buffer.
Effects: Sets upstream_rsrc to upstream,current_buffer to buffer, andnext_buffer_size to buffer_size (but not less than 1), then increases next_buffer_sizeby an implementation-defined growth factor (which need not be integral).
~monotonic_buffer_resource();
Effects: Calls release().