Use better cache sizes
authorFlorian Festi <ffesti@redhat.com>
Thu, 16 Oct 2008 10:13:13 +0000 (12:13 +0200)
committerFlorian Festi <ffesti@redhat.com>
Fri, 24 Oct 2008 08:34:26 +0000 (10:34 +0200)
lib/transaction.c

index a9c4a91..46b949d 100644 (file)
@@ -1061,9 +1061,9 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
        (void) rpmtsSetChrootDone(ts, 1);
     }
 
-    ts->ht = rpmFpHashCreate(totalFileCount * 2, fpHashFunction, fpEqual,
+    ts->ht = rpmFpHashCreate(totalFileCount * 2 + 1, fpHashFunction, fpEqual,
                             NULL, NULL);
-    fpc = fpCacheCreate(totalFileCount * 2);
+    fpc = fpCacheCreate(totalFileCount * 2 + 10001);
 
     /* ===============================================
      * Add fingerprint for each file not skipped.