Function darray_element_space

Function Documentation

static inline size_t darray_element_space(size_t max_elts, size_t elt_size)

Calculate the # of bytes that will be required for the specified # of elements and the element size.

Parameters:
  • max_elts – # of desired elements the dynamic array will hold.

  • elt_size – size of elements in bytes.

Returns:

The total # of bytes the application would need to allocate.