Lines Matching defs:pool
30 CRIdPool *pool = (CRIdPool *) crCalloc(sizeof(CRIdPool));
31 pool->freeList = (FreeElem *) crCalloc(sizeof(FreeElem));
32 pool->freeList->min = 1;
33 pool->freeList->max = CR_MAXUINT;
34 pool->freeList->next = NULL;
35 pool->freeList->prev = NULL;
36 return pool;
39 void crFreeIdPool( CRIdPool *pool )
42 for (i = pool->freeList; i; i = next)
47 crFree(pool);
54 GLuint crIdPoolAllocBlock( CRIdPool *pool, GLuint count )
61 f = pool->freeList;
73 if (f == pool->freeList)
76 pool->freeList = pool->freeList->next;
77 pool->freeList->prev = NULL;
94 CRASSERT(crIdPoolIsIdUsed(pool, ret + i));
114 void crIdPoolFreeBlock( CRIdPool *pool, GLuint first, GLuint count )
123 for (i = pool->freeList; i && i->next && i->next->min < first; i = i->next)
147 if (i == pool->freeList)
149 pool->freeList = i->next;
169 if (i == pool->freeList)
171 pool->freeList = i->next;
205 if (i == pool->freeList && i->min > first)
210 pool->freeList = newelem;
220 void crIdPoolAllocId( CRIdPool *pool, GLuint id )
226 f = pool->freeList;
265 GLboolean crIdPoolIsIdFree( const CRIdPool *pool, GLuint id )
270 for (i = pool->freeList; i && !(i->min <= id && id <= i->max); i=i->next)
285 GLboolean crIdPoolIsIdUsed( const CRIdPool *pool, GLuint id )
287 return (GLboolean) !crIdPoolIsIdFree( pool, id);