Allocates a chunk of memory for a packet.
- Parameters
-
descriptor | The OPTIONAL data descriptor of the signal for which memory is to be allocated. This can provide hints to the allocator. However, allocator implementations MUST accept null values. |
bytes | The number of bytes to allocate. |
align | The alignment requirement of the caller (typically the element size). This value may be zero if the caller does not need to specify an alignment requirement. |
- Returns
- The address of the allocated memory.
The implementation MAY set address value to nullptr
without returning an error code, if the allocator is out of memory. Alternatively, the implementation MAY return an error code in this case.