Skip to content

Commit bb65e14

Browse files
committed
Use more sensible start capacity for hb_array
1 parent ee69f66 commit bb65e14

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/util/hb_array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ bool hb_array_append(hb_array_T* array, void* item) {
3939
size_t new_capacity;
4040

4141
if (array->capacity == 0) {
42-
new_capacity = 1;
42+
new_capacity = 8;
4343
} else if (array->capacity > SIZE_MAX / (2 * sizeof(void*))) {
4444
fprintf(stderr, "Warning: Approaching array size limits, using conservative growth.\n");
4545
new_capacity = array->capacity + 1024 / sizeof(void*);

0 commit comments

Comments
 (0)