Lines Matching refs:parent

89 	deMemPool*		parent;				/*!< Pointer to parent (null for root pools).		*/
93 deMemPool* prevPool; /*!< Previous pool in parent's linked list. */
94 deMemPool* nextPool; /*!< Next pool in parent's linked list. */
166 * \param parent Parent pool (may be null).
169 static deMemPool* createPoolInternal (deMemPool* parent)
175 if (parent && parent->allowFailing)
177 if ((deRandom_getUint32(&parent->failRandom) & 16383) <= 15)
195 /* Register to parent. */
196 pool->parent = parent;
197 if (parent)
199 parent->numChildren++;
200 if (parent->firstChild) parent->firstChild->prevPool = pool;
201 pool->nextPool = parent->firstChild;
202 parent->firstChild = pool;
205 /* Get utils from parent. */
206 pool->util = parent ? parent->util : DE_NULL;
209 pool->allowFailing = parent ? parent->allowFailing : DE_FALSE;
210 deRandom_init(&pool->failRandom, parent ? deRandom_getUint32(&parent->failRandom) : 0x1234abcd);
214 pool->enableDebugAllocs = parent ? parent->enableDebugAllocs : DE_FALSE;
220 while (root->parent)
221 root = root->parent;
281 deMemPool* deMemPool_create (deMemPool* parent)
284 DE_ASSERT(parent);
285 pool = createPoolInternal(parent);
286 if (!pool && parent->util)
287 parent->util->allocFailCallback(parent->util->userPointer);
305 if (pool->parent)
307 deMemPool* root = pool->parent;
308 while (root->parent)
309 root = root->parent;
330 if (pool->parent)
332 deMemPool* parent = pool->parent;
333 if (parent->firstChild == pool)
334 parent->firstChild = pool->nextPool;
336 parent->numChildren--;
337 DE_ASSERT(parent->numChildren >= 0);
585 DE_ASSERT(pool && !pool->parent); /* must be root */
591 DE_ASSERT(pool && !pool->parent); /* must be root */