diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-17 19:58:00 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-17 19:58:00 -0700 |
commit | fc450ffb9cc44781fa50b789dd5394e3f8937b36 (patch) | |
tree | 55387d188854f77f205b6439d1eb222e552a7b2d /struct.c | |
parent | 3d95abc9d28983a21215c6156dd9d57374cfed53 (diff) | |
download | txr-fc450ffb9cc44781fa50b789dd5394e3f8937b36.tar.gz txr-fc450ffb9cc44781fa50b789dd5394e3f8937b36.tar.bz2 txr-fc450ffb9cc44781fa50b789dd5394e3f8937b36.zip |
New function chk_manage_vec.
This function manages a dynamic array using only the filled
size as input, while minimizing reallocations. The allocated
size is implicitly always the next power of two at or above
the filled size.
* lib.c (next_pow_two): New static function.
(chk_manage_vec): New function.
* lib.h (chk_manage_vec): Declared.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions