diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-03 14:13:26 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-03 14:13:26 -0400 |
commit | 19a52402126c96c759f416d65f7a1925c32aead5 (patch) | |
tree | aaab309b5663f517ffd94609cb0ec6e21429fa18 /blockarr.c | |
parent | e3634dd87fa6598610088e3d5622e6d35f80e19f (diff) |
started switching array system
Diffstat (limited to 'blockarr.c')
-rw-r--r-- | blockarr.c | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -4,19 +4,6 @@ They ensure that pointers to values in the array are not invalidated when something is added to the array. */ -typedef struct { - void *data; - size_t n; /* number of things in this block so far */ - void *last; /* last one of them */ -} ArrBlock; - -typedef struct { - size_t item_sz; - int lg_block_sz; - /* NOTE: dynamic array tends to over-allocate, so we're using our own */ - Array blocks; -} BlockArr; - /* Note: the block size must be a power of 2, to use right shifting instead of division (for optimization)! |