xip_status
xip_array_<type>_reserve_dim(
xip_array_<type>* p,
size_t max_nels
);
This function ensures that array p has sufficient space to store up to max_ndims
dimensions. If the
current dim_capacity is insufficient and the current owner is zero, the function attempts to allocate
or reallocate space to meet the request. The function returns XIP_STATUS_OK
if the array capacity
is now sufficient or XIP_STATUS_ERROR
if memory could not be allocated.
Note: This function does not change the data or dimensions held within the array in any
way; the contents of the array after calling the function are equivalent to the
contents before calling the function, even if memory is reallocated. Also, this
function never reduces memory allocation; use
xip_array_<type>_destroy
to release memory.