allocateFromBuffer overloads
Declared in <bslma_bufferallocator.h>
Allocate a memory block of the specified size from buffer.
static
void*
allocateFromBuffer(
int* cursor,
char* buffer,
size_type bufSize,
size_type size,
AlignmentStrategy strategy);
» more...
Allocate a memory block of the specified size from buffer with the specified alignment.
static
void*
allocateFromBuffer(
int* cursor,
char* buffer,
size_type bufSize,
size_type size,
int alignment);
» more...
address of the allocated block, or null if insufficient space
| Name | Description |
|---|---|
| cursor | Index of the next available byte in buffer (in/out). |
| buffer | Memory buffer from which to allocate. |
| bufSize | Size (in bytes) of buffer. |
| size | Number of bytes to allocate. |
| strategy | Alignment strategy used for the allocation. |
| alignment | Alignment (in bytes) for the allocated block. |