Home | History | Annotate | Download | only in rtl

Lines Matching refs:Cache

13 // DenseSlabAllocCache is a thread-local cache for DenseSlabAlloc.
32 IndexT cache[kSize];
39 typedef DenseSlabAllocCache Cache;
40 typedef typename Cache::IndexT IndexT;
61 IndexT Alloc(Cache *c) {
64 return c->cache[--c->pos];
67 void Free(Cache *c, IndexT idx) {
69 if (c->pos == Cache::kSize)
71 c->cache[c->pos++] = idx;
80 void FlushCache(Cache *c) {
83 IndexT idx = c->cache[--c->pos];
89 void InitCache(Cache *c) {
91 internal_memset(c->cache, 0, sizeof(c->cache));
100 void Refill(Cache *c) {
118 for (uptr i = 0; i < Cache::kSize / 2 && freelist_ != 0; i++) {
120 c->cache[c->pos++] = idx;
125 void Drain(Cache *c) {
127 for (uptr i = 0; i < Cache::kSize / 2; i++) {
128 IndexT idx = c->cache[--c->pos];