Create an expandable array.
The array is initialized with a fixed number of elements but expands automatically when full. Use a positive elem_size for fixed-size elements (e.g., sizeof(int)), or a negative value to store variable-length pointers (the array stores the pointers, not the data they point to).
- Parameters
-
| [in] | elem_size | Size of a single element in bytes, or negative for variable-length pointer storage |
- Returns
- New array on success, NULL on error