mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
Add comment for specialization in zend_hash_real_init_packed_ex()
As the seemingly reundant code may be confusing. Closes GH-6988.
This commit is contained in:
parent
a40cdd55f8
commit
07da2e3f28
@ -150,6 +150,7 @@ static zend_always_inline void zend_hash_real_init_packed_ex(HashTable *ht)
|
||||
if (UNEXPECTED(GC_FLAGS(ht) & IS_ARRAY_PERSISTENT)) {
|
||||
data = pemalloc(HT_SIZE_EX(ht->nTableSize, HT_MIN_MASK), 1);
|
||||
} else if (EXPECTED(ht->nTableSize == HT_MIN_SIZE)) {
|
||||
/* Use specialized API with constant allocation amount for a particularly common case. */
|
||||
data = emalloc(HT_SIZE_EX(HT_MIN_SIZE, HT_MIN_MASK));
|
||||
} else {
|
||||
data = emalloc(HT_SIZE_EX(ht->nTableSize, HT_MIN_MASK));
|
||||
|
Loading…
Reference in New Issue
Block a user