From Jason Turner

[mem.res.monotonic.buffer.ctor]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpo4knwzvo/{from.md → to.md} +33 -0
tmp/tmpo4knwzvo/{from.md → to.md} RENAMED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### `monotonic_buffer_resource` constructor and destructor <a id="mem.res.monotonic.buffer.ctor">[[mem.res.monotonic.buffer.ctor]]</a>
2
+
3
+ ``` cpp
4
+ explicit monotonic_buffer_resource(memory_resource* upstream);
5
+ monotonic_buffer_resource(size_t initial_size, memory_resource* upstream);
6
+ ```
7
+
8
+ *Requires:* `upstream` shall be the address of a valid memory resource.
9
+ `initial_size`, if specified, shall be greater than zero.
10
+
11
+ *Effects:* Sets `upstream_rsrc` to `upstream` and `current_buffer` to
12
+ `nullptr`. If `initial_size` is specified, sets `next_buffer_size` to at
13
+ least `initial_size`; otherwise sets `next_buffer_size` to an
14
+ *implementation-defined* size.
15
+
16
+ ``` cpp
17
+ monotonic_buffer_resource(void* buffer, size_t buffer_size, memory_resource* upstream);
18
+ ```
19
+
20
+ *Requires:* `upstream` shall be the address of a valid memory resource.
21
+ `buffer_size` shall be no larger than the number of bytes in `buffer`.
22
+
23
+ *Effects:* Sets `upstream_rsrc` to `upstream`, `current_buffer` to
24
+ `buffer`, and `next_buffer_size` to `buffer_size` (but not less than 1),
25
+ then increases `next_buffer_size` by an *implementation-defined* growth
26
+ factor (which need not be integral).
27
+
28
+ ``` cpp
29
+ ~monotonic_buffer_resource();
30
+ ```
31
+
32
+ *Effects:* Calls `release()`.
33
+