41 #ifndef __TOMMYARRAYBLKOF_H
42 #define __TOMMYARRAYBLKOF_H
55 #define TOMMY_ARRAYBLKOF_SIZE (4 * 1024)
93 assert(pos < array->count);
#define TOMMY_ARRAYBLKOF_SIZE
Elements for each block.
Definition: tommyarrayblkof.h:55
tommy_uint32_t tommy_count_t
Generic unsigned integer for counting objects.
Definition: tommytypes.h:67
struct tommy_arrayblkof_struct tommy_arrayblkof
Array container type.
void tommy_arrayblkof_grow(tommy_arrayblkof *array, tommy_count_t size)
Grows the size up to the specified value.
tommy_size_t tommy_arrayblkof_memory_usage(tommy_arrayblkof *array)
Gets the size of allocated memory.
Array container type.
Definition: tommyarrayblkof.h:61
void * tommy_arrayblkof_ref(tommy_arrayblkof *array, tommy_count_t pos)
Gets a reference of the element at the specified position.
Definition: tommyarrayblkof.h:89
Dynamic array based on segments of exponential growing size.
void tommy_arrayblkof_init(tommy_arrayblkof *array, tommy_size_t element_size)
Initializes the array.
tommy_count_t tommy_arrayblkof_size(tommy_arrayblkof *array)
Gets the initialized size of the array.
Definition: tommyarrayblkof.h:103
tommy_size_t element_size
Size of the stored element in bytes.
Definition: tommyarrayblkof.h:63
tommy_array block
Array of blocks.
Definition: tommyarrayblkof.h:62
void tommy_arrayblkof_done(tommy_arrayblkof *array)
Deinitializes the array.
void * tommy_array_get(tommy_array *array, tommy_count_t pos)
Gets the element at the specified position.
Definition: tommyarray.h:120
size_t tommy_size_t
Generic size_t type.
Definition: tommytypes.h:50
Array container type.
Definition: tommyarray.h:65
tommy_count_t count
Number of initialized elements in the array.
Definition: tommyarrayblkof.h:64