From: Dmitry Stogov Date: Thu, 24 Jan 2019 13:01:04 +0000 (+0300) Subject: Delay hash table allocation X-Git-Tag: php-7.4.0alpha1~1163 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f80b1b0c5693d7d86d76f4d28d6d81fb345d75e1;p=php Delay hash table allocation --- diff --git a/Zend/zend_string.c b/Zend/zend_string.c index b81d5f1a73..538d464bb4 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -67,10 +67,12 @@ ZEND_KNOWN_STRINGS(_ZEND_STR_DSC) NULL }; -static void zend_init_interned_strings_ht(HashTable *interned_strings, int permanent) +static zend_always_inline void zend_init_interned_strings_ht(HashTable *interned_strings, int permanent) { zend_hash_init(interned_strings, 1024, NULL, _str_dtor, permanent); - zend_hash_real_init_mixed(interned_strings); + if (permanent) { + zend_hash_real_init_mixed(interned_strings); + } } ZEND_API void zend_interned_strings_init(void)