Ring1_Memory_allocate
Allocate a memory block.
Ring1_Result
Ring1_Memory_allocate
(
void **result,
size_t n
)
This function allocates a memory block of n
Bytes.
Parameter variables
result
- A pointer to a
void *
variable. n
- The size, in Bytes, of the memory block to allocate. Can be zero.
Return Values
Ring1_Result_Success
on success, Ring1_Result_Failure
on failure.
Post Conditions
If this function fails, then it sets the by-thread status variable.
Below is a list of failure conditions and the status codes indicating them.
Ring1_Status_InvalidArgument
result
is a null pointerRing1_Status_AllocationFailed
- the allocation failed
If this function fails, result
is not dereferenced.
If this function succeeds, *result
is assigned a pointer to a memory block of
n
Bytes.