Lines Matching full:cache

30 typedef QuarantineCache<QuarantineCallback> Cache;  typedef
37 static void DeallocateCache(Cache *cache) { in DeallocateCache() argument
38 while (QuarantineBatch *batch = cache->DequeueBatch()) in DeallocateCache()
77 Cache cache; in TEST() local
78 Cache to_deallocate; in TEST()
79 cache.MergeBatches(&to_deallocate); in TEST()
86 Cache cache; in TEST() local
87 cache.Enqueue(cb, kFakePtr, kBlockSize); in TEST()
88 ASSERT_EQ(kBlockSize + sizeof(QuarantineBatch), cache.Size()); in TEST()
90 Cache to_deallocate; in TEST()
91 cache.MergeBatches(&to_deallocate); in TEST()
94 ASSERT_EQ(kBlockSize + sizeof(QuarantineBatch), cache.Size()); in TEST()
99 DeallocateCache(&cache); in TEST()
103 // Make a cache with two batches small enough to merge. in TEST()
104 Cache from; in TEST()
106 Cache cache; in TEST() local
107 cache.Enqueue(cb, kFakePtr, kBlockSize); in TEST()
109 cache.Transfer(&from); in TEST()
110 ASSERT_EQ(kBlockSize * 2 + sizeof(QuarantineBatch) * 2, cache.Size()); in TEST()
112 Cache to_deallocate; in TEST()
113 cache.MergeBatches(&to_deallocate); in TEST()
116 ASSERT_EQ(kBlockSize * 2 + sizeof(QuarantineBatch), cache.Size()); in TEST()
119 DeallocateCache(&cache); in TEST()
126 // Make a cache with two batches small enough to merge. in TEST()
127 Cache from; in TEST()
128 Cache cache; in TEST() local
131 cache.Enqueue(cb, kFakePtr, kBlockSize); in TEST()
133 cache.Transfer(&from); in TEST()
135 sizeof(QuarantineBatch) * 2, cache.Size()); in TEST()
137 Cache to_deallocate; in TEST()
138 cache.MergeBatches(&to_deallocate); in TEST()
142 sizeof(QuarantineBatch) * 2, cache.Size()); in TEST()
145 DeallocateCache(&cache); in TEST()
153 // Make a cache with many small batches. in TEST()
154 Cache cache; in TEST() local
156 Cache from; in TEST()
158 cache.Transfer(&from); in TEST()
162 sizeof(QuarantineBatch) * kNumBatchesBeforeMerge, cache.Size()); in TEST()
164 Cache to_deallocate; in TEST()
165 cache.MergeBatches(&to_deallocate); in TEST()
169 sizeof(QuarantineBatch) * kNumBatchesAfterMerge, cache.Size()); in TEST()
175 DeallocateCache(&cache); in TEST()