diff options
-rw-r--r-- | Zend/zend_hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 1fd3ccf3d9..09b8fa488e 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -777,7 +777,7 @@ static void ZEND_FASTCALL zend_hash_do_resize(HashTable *ht) IS_CONSISTENT(ht); HT_ASSERT(GC_REFCOUNT(ht) == 1); - if (ht->nNumUsed > ht->nNumOfElements) { + if (ht->nNumUsed > ht->nNumOfElements + (ht->nNumOfElements >> 5)) { /* additional term is there to amortize the cost of compaction */ HANDLE_BLOCK_INTERRUPTIONS(); zend_hash_rehash(ht); HANDLE_UNBLOCK_INTERRUPTIONS(); |