BLI_ghash: Fix initial over-allocation of mempool chunks.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 1 Jun 2016 10:58:59 +0000 (12:58 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 1 Jun 2016 10:58:59 +0000 (12:58 +0200)
Code intended to create only one pool by default here, but code in `mempool_maxchunks()` would make it two.

source/blender/blenlib/intern/BLI_ghash.c

index 05f2d9221ef5a0068fdd5592c1bb138066e0f70f..0b5adab39297465fdb0f7aa37550afbc5da326c4 100644 (file)
@@ -441,7 +441,7 @@ static GHash *ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info,
        gh->flag = flag;
 
        ghash_buckets_reset(gh, nentries_reserve);
-       gh->entrypool = BLI_mempool_create(GHASH_ENTRY_SIZE(flag & GHASH_FLAG_IS_GSET), 64, 64, BLI_MEMPOOL_NOP);
+       gh->entrypool = BLI_mempool_create(GHASH_ENTRY_SIZE(flag & GHASH_FLAG_IS_GSET), 0, 64, BLI_MEMPOOL_NOP);
 
        return gh;
 }