diff options
Diffstat (limited to 'src/hist.c')
| -rw-r--r-- | src/hist.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -67,8 +67,7 @@ static TERM_NOINLINE bool ring_grow(struct hist *h, uint64_t n) uint64_t cap = h->ring ? (uint64_t)h->ring_mask + 1 : 65536; if (cap < 65536) cap = 65536; - while (cap < h->head - h->tail + n) - cap *= 2; + cap = term_grow_cap64(cap, h->head - h->tail + n); struct hline *ring = term_aligned_alloc(64, (size_t)cap * sizeof(*ring)); if (!ring) return false; |
