Lines Matching refs:TESTPCACHE_NPAGE
85 # define TESTPCACHE_NPAGE 499 macro
87 # define TESTPCACHE_NPAGE 217 macro
113 } a[TESTPCACHE_NPAGE]; /* All pages in the cache */
144 nMem = sizeof(testpcache) + TESTPCACHE_NPAGE*(szPage+szExtra); in testpcacheCreate()
150 p->nFree = TESTPCACHE_NPAGE; in testpcacheCreate()
155 for(i=0; i<TESTPCACHE_NPAGE; i++, x += (szPage+szExtra)){ in testpcacheCreate()
184 return TESTPCACHE_NPAGE - p->nFree; in testpcachePagecount()
202 for(i=0; i<TESTPCACHE_NPAGE; i++){ in testpcacheFetch()
206 assert( p->nPinned <= TESTPCACHE_NPAGE - p->nFree ); in testpcacheFetch()
219 if( p->nPinned==TESTPCACHE_NPAGE ){ in testpcacheFetch()
224 if( p->nPinned>=TESTPCACHE_NPAGE-TESTPCACHE_RESERVE && createFlag<2 ){ in testpcacheFetch()
241 j = testpcacheRandom(p) % TESTPCACHE_NPAGE; in testpcacheFetch()
242 for(i=0; i<TESTPCACHE_NPAGE; i++, j = (j+1)%TESTPCACHE_NPAGE){ in testpcacheFetch()
250 assert( p->nPinned <= TESTPCACHE_NPAGE - p->nFree ); in testpcacheFetch()
268 j = testpcacheRandom(p) % TESTPCACHE_NPAGE; in testpcacheFetch()
269 for(i=0; i<TESTPCACHE_NPAGE; i++, j = (j+1)%TESTPCACHE_NPAGE){ in testpcacheFetch()
276 assert( p->nPinned <= TESTPCACHE_NPAGE - p->nFree ); in testpcacheFetch()
310 for(i=0; i<TESTPCACHE_NPAGE; i++){ in testpcacheUnpin()
320 assert( p->nFree<=TESTPCACHE_NPAGE ); in testpcacheUnpin()
349 for(i=0; i<TESTPCACHE_NPAGE; i++){ in testpcacheRekey()
355 assert( p->nFree<=TESTPCACHE_NPAGE ); in testpcacheRekey()
362 for(i=0; i<TESTPCACHE_NPAGE; i++){ in testpcacheRekey()
388 for(i=0; i<TESTPCACHE_NPAGE; i++){ in testpcacheTruncate()
396 assert( p->nFree<=TESTPCACHE_NPAGE ); in testpcacheTruncate()