Lines Matching refs:cache
218 typename Allocator::AllocatorCache cache; in TestSizeClassAllocator() local
219 memset(&cache, 0, sizeof(cache)); in TestSizeClassAllocator()
220 cache.Init(0); in TestSizeClassAllocator()
240 char *x = (char*)cache.Allocate(a, class_id0); in TestSizeClassAllocator()
264 cache.Deallocate(a, a->GetSizeClass(x), x); in TestSizeClassAllocator()
367 typename Allocator::AllocatorCache cache; in SizeClassAllocatorMetadataStress() local
368 memset(&cache, 0, sizeof(cache)); in SizeClassAllocatorMetadataStress()
369 cache.Init(0); in SizeClassAllocatorMetadataStress()
375 void *x = cache.Allocate(a, 1 + i % (Allocator::kNumClasses - 1)); in SizeClassAllocatorMetadataStress()
386 cache.Deallocate(a, 1 + i % (Allocator::kNumClasses - 1), allocated[i]); in SizeClassAllocatorMetadataStress()
427 typename Allocator::AllocatorCache cache; in SizeClassAllocatorGetBlockBeginStress() local
428 memset(&cache, 0, sizeof(cache)); in SizeClassAllocatorGetBlockBeginStress()
429 cache.Init(0); in SizeClassAllocatorGetBlockBeginStress()
435 void *x = cache.Allocate(a, max_size_class); in SizeClassAllocatorGetBlockBeginStress()
509 typename Allocator64WithCallBack::AllocatorCache cache; in TEST() local
510 memset(&cache, 0, sizeof(cache)); in TEST()
511 cache.Init(0); in TEST()
545 Allocator32WithCallBack::AllocatorCache cache; in TEST() local
546 memset(&cache, 0, sizeof(cache)); in TEST()
547 cache.Init(0); in TEST()
550 a->AllocateBatch(&stats, &cache, 32); in TEST()
579 Allocator64::AllocatorCache cache; in TEST() local
580 memset(&cache, 0, sizeof(cache)); in TEST()
581 cache.Init(0); in TEST()
686 typename Allocator::AllocatorCache cache; in TestCombinedAllocator() local
687 memset(&cache, 0, sizeof(cache)); in TestCombinedAllocator()
688 a->InitCache(&cache); in TestCombinedAllocator()
690 EXPECT_EQ(a->Allocate(&cache, -1, 1), (void*)0); in TestCombinedAllocator()
691 EXPECT_EQ(a->Allocate(&cache, -1, 1024), (void*)0); in TestCombinedAllocator()
692 EXPECT_EQ(a->Allocate(&cache, (uptr)-1 - 1024, 1), (void*)0); in TestCombinedAllocator()
693 EXPECT_EQ(a->Allocate(&cache, (uptr)-1 - 1024, 1024), (void*)0); in TestCombinedAllocator()
694 EXPECT_EQ(a->Allocate(&cache, (uptr)-1 - 1023, 1024), (void*)0); in TestCombinedAllocator()
695 EXPECT_EQ(a->Allocate(&cache, -1, 1), (void*)0); in TestCombinedAllocator()
705 void *x = a->Allocate(&cache, size, 1); in TestCombinedAllocator()
736 a->Deallocate(&cache, x); in TestCombinedAllocator()
739 a->SwallowCache(&cache); in TestCombinedAllocator()
741 a->DestroyCache(&cache); in TestCombinedAllocator()
780 AllocatorCache cache; in TestSizeClassAllocatorLocalCache() local
784 memset(&cache, 0, sizeof(cache)); in TestSizeClassAllocatorLocalCache()
785 cache.Init(0); in TestSizeClassAllocatorLocalCache()
794 allocated[i] = cache.Allocate(a, class_id); in TestSizeClassAllocatorLocalCache()
797 cache.Deallocate(a, class_id, allocated[i]); in TestSizeClassAllocatorLocalCache()
799 cache.Drain(a); in TestSizeClassAllocatorLocalCache()
963 typename Allocator::AllocatorCache cache; in TestSizeClassAllocatorIteration() local
964 memset(&cache, 0, sizeof(cache)); in TestSizeClassAllocatorIteration()
965 cache.Init(0); in TestSizeClassAllocatorIteration()
981 void *x = cache.Allocate(a, class_id0); in TestSizeClassAllocatorIteration()
1112 SpecialAllocator64::AllocatorCache cache; in TEST() local
1113 memset(&cache, 0, sizeof(cache)); in TEST()
1114 cache.Init(0); in TEST()
1123 EXPECT_NE(cache.Allocate(a, kClassID), nullptr); in TEST()
1124 EXPECT_NE(cache.Allocate(a, kClassID), nullptr); in TEST()
1125 EXPECT_EQ(cache.Allocate(a, kClassID), nullptr); in TEST()
1132 p[i] = (char*)cache.Allocate(a, Class2); in TEST()
1138 EXPECT_EQ(cache.Allocate(a, Class2), nullptr); in TEST()
1139 cache.Deallocate(a, Class2, p[0]); in TEST()
1140 cache.Drain(a); in TEST()