Lines Matching refs:j
196 int i, j; in testpcacheFetch() local
241 j = testpcacheRandom(p) % TESTPCACHE_NPAGE; in testpcacheFetch()
242 for(i=0; i<TESTPCACHE_NPAGE; i++, j = (j+1)%TESTPCACHE_NPAGE){ in testpcacheFetch()
243 if( p->a[j].key==0 ){ in testpcacheFetch()
244 p->a[j].key = key; in testpcacheFetch()
245 p->a[j].isPinned = 1; in testpcacheFetch()
246 memset(p->a[j].page.pBuf, 0, p->szPage); in testpcacheFetch()
247 memset(p->a[j].page.pExtra, 0, p->szExtra); in testpcacheFetch()
251 return &p->a[j].page; 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()
270 if( p->a[j].key>0 && p->a[j].isPinned==0 ){ in testpcacheFetch()
271 p->a[j].key = key; in testpcacheFetch()
272 p->a[j].isPinned = 1; in testpcacheFetch()
273 memset(p->a[j].page.pBuf, 0, p->szPage); in testpcacheFetch()
274 memset(p->a[j].page.pExtra, 0, p->szExtra); in testpcacheFetch()
277 return &p->a[j].page; in testpcacheFetch()