tmp/tmp94g96bif/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Pool resource constructors and destructors <a id="mem.res.pool.ctor">[[mem.res.pool.ctor]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
synchronized_pool_resource(const pool_options& opts, memory_resource* upstream);
|
| 5 |
+
unsynchronized_pool_resource(const pool_options& opts, memory_resource* upstream);
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Requires:* `upstream` is the address of a valid memory resource.
|
| 9 |
+
|
| 10 |
+
*Effects:* Constructs a pool resource object that will obtain memory
|
| 11 |
+
from `upstream` whenever the pool resource is unable to satisfy a memory
|
| 12 |
+
request from its own internal data structures. The resulting object will
|
| 13 |
+
hold a copy of `upstream`, but will not own the resource to which
|
| 14 |
+
`upstream` points.
|
| 15 |
+
|
| 16 |
+
[*Note 1*: The intention is that calls to `upstream->allocate()` will
|
| 17 |
+
be substantially fewer than calls to `this->allocate()` in most
|
| 18 |
+
cases. — *end note*]
|
| 19 |
+
|
| 20 |
+
The behavior of the pooling mechanism is tuned according to the value of
|
| 21 |
+
the `opts` argument.
|
| 22 |
+
|
| 23 |
+
*Throws:* Nothing unless `upstream->allocate()` throws. It is
|
| 24 |
+
unspecified if, or under what conditions, this constructor calls
|
| 25 |
+
`upstream->allocate()`.
|
| 26 |
+
|
| 27 |
+
``` cpp
|
| 28 |
+
virtual ~synchronized_pool_resource();
|
| 29 |
+
virtual ~unsynchronized_pool_resource();
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
*Effects:* Calls `release()`.
|
| 33 |
+
|