Lines Matching refs:IndexT
30 typedef u32 IndexT; typedef
32 IndexT cache[kSize];
40 typedef typename Cache::IndexT IndexT; typedef
46 CHECK_GE(1ull << (sizeof(IndexT) * 8), kL1Size * kL2Size); in DenseSlabAlloc()
48 CHECK_GE(sizeof(T), sizeof(IndexT)); in DenseSlabAlloc()
61 IndexT Alloc(Cache *c) { in Alloc()
67 void Free(Cache *c, IndexT idx) { in Free()
74 T *Map(IndexT idx) { in Map()
83 IndexT idx = c->cache[--c->pos]; in FlushCache()
84 *(IndexT*)Map(idx) = freelist_; in FlushCache()
97 IndexT freelist_;
109 IndexT start = fillpos_ == 0 ? 1 : 0; in Refill()
110 for (IndexT i = start; i < kL2Size; i++) { in Refill()
112 *(IndexT*)(batch + i) = i + 1 + fillpos_ * kL2Size; in Refill()
114 *(IndexT*)(batch + kL2Size - 1) = 0; in Refill()
119 IndexT idx = freelist_; in Refill()
121 freelist_ = *(IndexT*)Map(idx); in Refill()
128 IndexT idx = c->cache[--c->pos]; in Drain()
129 *(IndexT*)Map(idx) = freelist_; in Drain()