Skip to content

Commit f80b1b0

Browse files
committed
Delay hash table allocation
1 parent ab9a9a6 commit f80b1b0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Zend/zend_string.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@ ZEND_KNOWN_STRINGS(_ZEND_STR_DSC)
6767
NULL
6868
};
6969

70-
static void zend_init_interned_strings_ht(HashTable *interned_strings, int permanent)
70+
static zend_always_inline void zend_init_interned_strings_ht(HashTable *interned_strings, int permanent)
7171
{
7272
zend_hash_init(interned_strings, 1024, NULL, _str_dtor, permanent);
73-
zend_hash_real_init_mixed(interned_strings);
73+
if (permanent) {
74+
zend_hash_real_init_mixed(interned_strings);
75+
}
7476
}
7577

7678
ZEND_API void zend_interned_strings_init(void)

0 commit comments

Comments
 (0)