diff --git a/node-ram-cache.c b/node-ram-cache.c index 496fc1779..d2377601d 100644 --- a/node-ram-cache.c +++ b/node-ram-cache.c @@ -356,7 +356,7 @@ void init_node_ram_cache( int strategy, int cacheSizeMB, int fixpointscale ) { cacheSize = (int64_t)cacheSizeMB*(1024*1024); /* How much we can fit, and make sure it's odd */ maxBlocks = (cacheSize/(PER_BLOCK*sizeof(struct ramNode))); - maxSparseTuples = (cacheSize/sizeof(struct ramNodeID)); + maxSparseTuples = (cacheSize/sizeof(struct ramNodeID))+1; allocStrategy = strategy; scale = fixpointscale;