A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/mem.res.monotonic.buffer.mem below:

[mem.res.monotonic.buffer.mem]

23 General utilities library [utilities] 23.12 Memory resources [mem.res] 23.12.6 Class monotonic_­buffer_­resource [mem.res.monotonic.buffer] 23.12.6.2 monotonic_­buffer_­resource members [mem.res.monotonic.buffer.mem]

void release();

Effects: Calls upstream_­rsrc->deallocate() as necessary to release all allocated memory.

[Note: The memory is released back to upstream_­rsrc even if some blocks that were allocated from this have not been deallocated from this.end note]

memory_resource* upstream_resource() const;

Returns: The value of upstream_­rsrc.

void* do_allocate(size_t bytes, size_t alignment) override;

Effects: If the unused space in current_­buffer can fit a block with the specified bytes and alignment, then allocate the return block from current_­buffer; otherwise set current_­buffer to upstream_­rsrc->allocate(n, m), where n is not less than max(bytes, next_­buffer_­size) and m is not less than alignment, and increase next_­buffer_­size by an implementation-defined growth factor (which need not be integral), then allocate the return block from the newly-allocated current_­buffer.

Throws: Nothing unless upstream_­rsrc->allocate() throws.

void do_deallocate(void* p, size_t bytes, size_t alignment) override;

Remarks: Memory used by this resource increases monotonically until its destruction.

bool do_is_equal(const memory_resource& other) const noexcept override;

Returns: this == dynamic_­cast<const monotonic_­buffer_­resource*>(&other).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4