Lines Matching refs:memoryPool
61 static MEMORY_POOL memoryPool[NUM_POOL_BINS]; variable
240 memoryPool[i].currentNumberOfPools = 0; in InitPools()
244 memoryPool[i].poolInfo[j].poolId = 0; in InitPools()
245 memoryPool[i].poolInfo[j].pMemory = NULL; in InitPools()
246 memoryPool[i].poolInfo[j].size = 0; in InitPools()
259 for (j = 0; j < (int)memoryPool[i].currentNumberOfPools; j++) in TermPools()
261 if (memoryPool[i].poolInfo[j].pMemory != NULL) in TermPools()
263 unsigned long retval = pt_delete(memoryPool[i].poolInfo[j].poolId); in TermPools()
266 PORT_ASSERT_GOOD_WRITE_POINTER(memoryPool[i].poolInfo[j].pMemory); in TermPools()
267 free(memoryPool[i].poolInfo[j].pMemory); in TermPools()
269 memoryPool[i].poolInfo[j].poolId = 0; in TermPools()
270 memoryPool[i].poolInfo[j].pMemory = NULL; in TermPools()
271 memoryPool[i].poolInfo[j].size = 0; in TermPools()
275 memoryPool[i].currentNumberOfPools = 0; in TermPools()
289 uint32 currentNumberOfPools = memoryPool[whichPool].currentNumberOfPools; in CreatePool()
329 memoryPool[whichPool].poolInfo[currentNumberOfPools].poolId = poolId; in CreatePool()
330 memoryPool[whichPool].poolInfo[currentNumberOfPools].pMemory = pMemory; in CreatePool()
331 memoryPool[whichPool].poolInfo[currentNumberOfPools].size = poolSize; in CreatePool()
332 memoryPool[whichPool].currentNumberOfPools++; in CreatePool()
341 if (memoryPool[whichPool].poolInfo[0].pMemory == NULL) in AddPool()
352 PORT_ASSERT(memoryPool[whichPool].poolInfo[poolIndex].poolId); in AllocateFromPsos()
354 retval = pt_getbuf(memoryPool[whichPool].poolInfo[poolIndex].poolId, &pMemory); in AllocateFromPsos()
389 for (poolIndex = 0; poolIndex < memoryPool[whichPool].currentNumberOfPools; poolIndex++) in SearchPoolsForMemory()
397 if (AddPool(whichPool, memoryPool[whichPool].poolInfo[0].size >> 1) == FALSE) in SearchPoolsForMemory()
404 pMemory = AllocateFromPsos(whichPool, memoryPool[whichPool].currentNumberOfPools - 1, size); in SearchPoolsForMemory()
430 if (memoryPool[poolIndex].poolInfo[0].pMemory != NULL) in PortMemBlockAllocateFromPool()
464 uint32 retval = pt_retbuf(memoryPool[whichPool].poolInfo[whichBin].poolId, pRealMemory); in PortMemBlockDeleteFromPool()