Function ds_elt_space_with_meta
Defined in File ds.h
Function Documentation
-
static inline size_t ds_elt_space_with_meta(size_t max_elts, size_t elt_size)
Calculate how large the chunk of memory for the elements that a data structure will manage needs to be, given a max # of elements and element size.
For data structures that DO require metadata (trees, linked lists, etc.).
You really shouldn’t use this function—use the specific calculation functions for each data structure found in their respective header files. Used in conjunction with RCSW_NOALLOC_DATA.
- Parameters:
max_elts – Max # elements the structure will manage
elt_size – Size of each element in bytes
- Returns:
Total # of bytes required