Searched refs:element_size (Results 1 – 2 of 2) sorted by relevance
31 size_t element_size; member42 array_t *array_new(size_t element_size) { in array_new() argument43 assert(element_size > 0); in array_new()45 array_t *array = osi_calloc(sizeof(array_t) + element_size * INTERNAL_ELEMENTS); in array_new()47 array->element_size = element_size; in array_new()70 return array->data + (index * array->element_size); in array_at()87 …st current capacity of %zu elements of size %zu.", __func__, array->capacity, array->element_size); in array_append_ptr()92 memcpy(array_at(array, array->length - 1), data, array->element_size); in array_append_ptr()100 void *new_data = realloc(is_moving ? NULL : array->data, new_capacity * array->element_size); in grow()105 memcpy(new_data, array->internal_storage, array->length * array->element_size); in grow()
30 array_t *array_new(size_t element_size);