FAQ
Hi,

In function zend_hash_init() when allocate no persistent memory (if flag
persistent is 0) for arBuckets element of struct HashTable and virtual
memory is over, the function always returns SUCCESS

Code:

if (persistent) {
tmp = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *));
if (!tmp) {
return FAILURE;
}
ht->arBuckets = tmp;
} else {
// No checking on return value?
tmp = (Bucket **) ecalloc_rel(ht->nTableSize, sizeof(Bucket *));
if (tmp) {
ht->arBuckets = tmp;
}
}

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupphp-internals @
categoriesphp
postedApr 28, '11 at 10:53a
activeApr 28, '11 at 11:50a
posts2
users2
websitephp.net

2 users in discussion

Anton Dobkin: 1 post Antony Dovgal: 1 post

People

Translate

site design / logo © 2022 Grokbase