Searched refs:element_size (Results 1 – 2 of 2) sorted by relevance
30 size_t element_size; member41 array_t *array_new(size_t element_size) { in array_new() argument42 assert(element_size > 0); in array_new()44 array_t *array = osi_calloc(sizeof(array_t) + element_size * INTERNAL_ELEMENTS); in array_new()46 …ERROR("%s unable to allocate memory for array with elements of size %zu.", __func__, element_size); in array_new()50 array->element_size = element_size; in array_new()73 return array->data + (index * array->element_size); in array_at()90 …st current capacity of %zu elements of size %zu.", __func__, array->capacity, array->element_size); in array_append_ptr()95 memcpy(array_at(array, array->length - 1), data, array->element_size); in array_append_ptr()103 void *new_data = realloc(is_moving ? NULL : array->data, new_capacity * array->element_size); in grow()[all …]
30 array_t *array_new(size_t element_size);