|
BDE 4.14.0 Production release
|
#include <bdlma_bufferimputil.h>
This struct provides a namespace for a suite of pure procedures for allocating memory from a buffer.
|
static |
Allocate a memory block of the specified size (in bytes) from the specified buffer having the specified bufferSize (in bytes) at the specified cursor position, using the specified alignment strategy. Return the address of the allocated memory block if buffer contains sufficient available memory, and 0 otherwise. The cursor is set to the first byte position immediately after the allocated memory if there is sufficient memory, and not modified otherwise. The behavior is undefined unless 0 < size, 0 <= *cursor, and *cursor <= bufferSize.
|
static |
Allocate a memory block of the specified size (in bytes) from the specified buffer at the specified cursor position, using the specified alignment strategy. 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.
|
static |
Allocate a maximally-aligned memory block of the specified size (in bytes) from the specified buffer having the specified bufferSize (in bytes) at the specified cursor position. Return the address of the allocated memory block if buffer contains sufficient available memory, and 0 otherwise. The cursor is set to the first byte position immediately after the allocated memory if there is sufficient memory, and not modified otherwise. The behavior is undefined unless 0 < size, 0 <= *cursor, and *cursor <= bufferSize.
|
static |
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.
|
static |
Allocate a naturally-aligned memory block of the specified size (in bytes) from the specified buffer having the specified bufferSize (in bytes) at the specified cursor position. Return the address of the allocated memory block if buffer contains sufficient available memory, and 0 otherwise. The cursor is set to the first byte position immediately after the allocated memory if there is sufficient memory, and not modified otherwise. The behavior is undefined unless 0 < size, 0 <= *cursor, and *cursor <= bufferSize.
|
static |
Allocate a naturally-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.
|
static |
Allocate a 1-byte-aligned memory block of the specified size (in bytes) from the specified buffer having the specified bufferSize (in bytes) at the specified cursor position. Return the address of the allocated memory block if buffer contains sufficient available memory, and 0 otherwise. The cursor is set to the first byte position immediately after the allocated memory if there is sufficient memory, and not modified otherwise. The behavior is undefined unless 0 < size, 0 <= *cursor, and *cursor <= bufferSize.
|
static |
Allocate a 1-byte-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.