commit - 4ada367c22bf146c8150cb54c980abc40c6e4465
commit + 0f2e686eec562e28977521d25101acfa4396b47a
blob - 904fe2806d161dfaee79db5f0f3c73e691d3f4dc
blob + 99b5d418b8cec83d130d52be4e5022d0310f8c31
--- lib/deltify.c
+++ lib/deltify.c
dt->blocks[i].offset = offset;
dt->blocks[i].hash = h;
dt->nblocks++;
- if (dt->nalloc < dt->nblocks + 64) {
+ if (dt->nalloc < dt->nblocks + 256) {
struct got_delta_block *db;
size_t old_size = dt->nalloc;
db = dt->blocks;
- dt->blocks = calloc(dt->nalloc + 64,
+ dt->blocks = calloc(dt->nalloc + 256,
sizeof(struct got_delta_block));
if (dt->blocks == NULL) {
err = got_error_from_errno("calloc");
dt->blocks = db;
return err;
}
- dt->nalloc += 64;
+ dt->nalloc += 256;
/*
* Recompute all block positions. Hash-based indices of blocks
* in the array depend on the allocated length of the array.
dt->blocks[i].offset = offset;
dt->blocks[i].hash = h;
dt->nblocks++;
- if (dt->nalloc < dt->nblocks + 64) {
+ if (dt->nalloc < dt->nblocks + 256) {
struct got_delta_block *db;
size_t old_size = dt->nalloc;
db = dt->blocks;
- dt->blocks = calloc(dt->nalloc + 64,
+ dt->blocks = calloc(dt->nalloc + 256,
sizeof(struct got_delta_block));
if (dt->blocks == NULL) {
err = got_error_from_errno("calloc");
dt->blocks = db;
return err;
}
- dt->nalloc += 64;
+ dt->nalloc += 256;
/*
* Recompute all block positions. Hash-based indices of blocks
* in the array depend on the allocated length of the array.