cpp/experimental/monotonic buffer resource/do allocate

Allocates storage.

If the current buffer has sufficient unused space to fit a block with the specified size and alignment, allocates the return block from the current buffer.

Otherwise, this function allocates a new buffer by calling, where is not less than the greater of  and the next buffer size and  is not less than. It sets the new buffer as the current buffer, increases the next buffer size by an implementation-defined growth factor (which is not necessarily integral), and then allocates the return block from the newly allocated buffer.

Return value
A pointer to allocated storage of at least bytes in size, aligned to the specified  if such alignment is supported, and to  otherwise.

Exceptions
Throws nothing unless calling on the upstream memory resource throws.