diff --git a/src/Memory.c b/src/Memory.c index 0994a91..efc10be 100644 --- a/src/Memory.c +++ b/src/Memory.c @@ -66,7 +66,9 @@ MemoryInsert(MemoryInfo * a) } } - if ((allocationsLen + 1) >= (0.75 * allocationsSize)) + /* If the next insertion would cause the table to be at least 3/4 + * full, re-allocate and re-hash. */ + if ((allocationsLen + 1) >= ((allocationsSize * 3) >> 2)) { size_t i; size_t tmpAllocationsSize = allocationsSize;