void ** vector_at(vector_t *v, size_t idx)
Return a pointer to where the vector element at 'idx' is stored.
void vector_vote(vector_t *v)
Vote on whether this vector should be given less memory.
vector_t vector_new(size_t initial_capacity)
Allocate and initialize a new vector.
void vector_push(vector_t *v, void *element)
Add the given element to the vector.
void * vector_pop(vector_t *v)
Remove and return some pointer that is contained in the given vector, or return NULL if the given vec...
size_t vector_size(vector_t *v)
Return the size of the vector.
void vector_pushall(vector_t *v, void **array, size_t size)
Add all elements of the given array to the vector.
void vector_free(vector_t *v)
Free the memory held by the given vector, invalidating it.
A vector (resizing array) data type.
Definition vector.h:29
int votes
The number of votes to shrink this vector.
Definition vector.h:74
int votes_required
The number of votes required to shrink this vector.
Definition vector.h:65
void ** next
The element after the last element in the underlying array.
Definition vector.h:46
void ** start
The start of the underlying array.
Definition vector.h:37
void ** end
The end of the underlying array.
Definition vector.h:55