Allocate a maximally-aligned memory block from a buffer, without checking capacity.
Declared in <bdlma_bufferimputil.h>
static
void*
allocateMaximallyAlignedFromBufferRaw(
bsls::Types::IntPtr* cursor,
char* buffer,
bsls::Types::size_type size);
Allocate a maximally-aligned memory block of the specified size (in bytes) from the specified buffer at the specified cursor position. Return the address of the allocated memory block. The cursor is set to the first byte position immediately after the allocated memory. The behavior is undefined unless 0 < size, buffer contains sufficient available memory, and cursor refers to a valid position in buffer.
address of the allocated memory block
| Name | Description |
|---|---|
| cursor | byte offset into buffer at which to allocate |
| buffer | memory buffer from which to allocate |
| size | size in bytes of the memory block to allocate |