We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7e7f2c commit 10a5707Copy full SHA for 10a5707
vcf.c
@@ -1370,8 +1370,11 @@ bcf_hdr_t *bcf_hdr_init(const char *mode)
1370
bcf_hdr_t *h;
1371
h = (bcf_hdr_t*)calloc(1, sizeof(bcf_hdr_t));
1372
if (!h) return NULL;
1373
- for (i = 0; i < 3; ++i)
+ for (i = 0; i < 3; ++i) {
1374
if ((h->dict[i] = kh_init(vdict)) == NULL) goto fail;
1375
+ // Supersize the hash to make collisions very unlikely
1376
+ if (kh_resize(vdict, h->dict[i], 32768) < 0) goto fail;
1377
+ }
1378
1379
bcf_hdr_aux_t *aux = (bcf_hdr_aux_t*)calloc(1,sizeof(bcf_hdr_aux_t));
1380
if ( !aux ) goto fail;
0 commit comments