mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-07 09:17:29 +00: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:
1 parent
a40cdd55f8
commit
07da2e3f28
1 file changed
+1
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user