Home
last modified time | relevance | path

Searched refs:element_size (Results 1 – 2 of 2) sorted by relevance

/system/bt/osi/src/
Darray.c30 size_t element_size; member
41 array_t *array_new(size_t element_size) { in array_new() argument
42 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 …]
/system/bt/osi/include/
Darray.h30 array_t *array_new(size_t element_size);