tdb: use optimal tally size for summary histograms.
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 25 Sep 2010 02:24:35 +0000 (11:54 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 25 Sep 2010 02:24:35 +0000 (11:54 +0930)
ccan/tdb/summary.c

index c4458d85615a305c1724a03a7a7eb2fdfd65bf9d..a9dc4f80a33ac9b5a3f94c121dceeabcd5946ca1 100644 (file)
@@ -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;