From: Rusty Russell Date: Sat, 25 Sep 2010 02:24:35 +0000 (+0930) Subject: tdb: use optimal tally size for summary histograms. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=96964cc8c51ded8f9176d749144c76453dc34bf5 tdb: use optimal tally size for summary histograms. --- diff --git a/ccan/tdb/summary.c b/ccan/tdb/summary.c index c4458d85..a9dc4f80 100644 --- a/ccan/tdb/summary.c +++ b/ccan/tdb/summary.c @@ -88,11 +88,11 @@ char *tdb_summary(struct tdb_context *tdb, enum tdb_summary_flags flags) locked = true; } - freet = tally_new(100); - used = tally_new(100); - dead = tally_new(100); - extra = tally_new(100); - hash = tally_new(100); + freet = tally_new(HISTO_HEIGHT); + used = tally_new(HISTO_HEIGHT); + dead = tally_new(HISTO_HEIGHT); + extra = tally_new(HISTO_HEIGHT); + hash = tally_new(HISTO_HEIGHT); if (!freet || !used || !dead || !extra || !hash) { tdb->ecode = TDB_ERR_OOM; goto unlock;