• Home
  • Raw
  • Download

Lines Matching refs:allocator

28   size_t NumberOfArenas(ArenaAllocator* allocator) {  in NumberOfArenas()  argument
30 for (Arena* a = allocator->arena_head_; a != nullptr; a = a->next_) { in NumberOfArenas()
39 ArenaAllocator allocator(&pool); in TEST_F() local
40 ArenaBitVector bv(&allocator, 10, true); in TEST_F()
55 ArenaAllocator allocator(&pool); in TEST_F() local
56 small_array = allocator.AllocArray<uint32_t>(kSmallArraySize); in TEST_F()
61 ArenaAllocator allocator(&pool); in TEST_F() local
62 uint32_t* large_array = allocator.AllocArray<uint32_t>(kLargeArraySize); in TEST_F()
77 ArenaAllocator allocator(&pool); in TEST_F() local
79 void* alloc1 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 5 / 8); in TEST_F()
80 void* alloc2 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 2 / 8); in TEST_F()
82 ASSERT_EQ(1u, NumberOfArenas(&allocator)); in TEST_F()
86 ArenaAllocator allocator(&pool); in TEST_F() local
87 void* alloc1 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 13 / 16); in TEST_F()
88 void* alloc2 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 11 / 16); in TEST_F()
90 ASSERT_EQ(2u, NumberOfArenas(&allocator)); in TEST_F()
91 void* alloc3 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 7 / 16); in TEST_F()
94 ASSERT_EQ(3u, NumberOfArenas(&allocator)); in TEST_F()
98 ArenaAllocator allocator(&pool); in TEST_F() local
99 void* alloc1 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 13 / 16); in TEST_F()
100 void* alloc2 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 9 / 16); in TEST_F()
102 ASSERT_EQ(2u, NumberOfArenas(&allocator)); in TEST_F()
104 void* alloc3 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 5 / 16); in TEST_F()
107 ASSERT_EQ(2u, NumberOfArenas(&allocator)); in TEST_F()
111 ArenaAllocator allocator(&pool); in TEST_F() local
112 void* alloc1 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 9 / 16); in TEST_F()
113 void* alloc2 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 13 / 16); in TEST_F()
115 ASSERT_EQ(2u, NumberOfArenas(&allocator)); in TEST_F()
117 void* alloc3 = allocator.Alloc(arena_allocator::kArenaDefaultSize * 5 / 16); in TEST_F()
120 ASSERT_EQ(2u, NumberOfArenas(&allocator)); in TEST_F()
124 ArenaAllocator allocator(&pool); in TEST_F() local
128 allocator.Alloc(arena_allocator::kArenaDefaultSize * 1 / 16); in TEST_F()
129 ASSERT_EQ(i + 1u, NumberOfArenas(&allocator)); in TEST_F()
131 allocator.Alloc(arena_allocator::kArenaDefaultSize * 17 / 16); in TEST_F()
132 ASSERT_EQ(i + 2u, NumberOfArenas(&allocator)); in TEST_F()
139 ArenaAllocator allocator(&pool); in TEST_F() local
142 void* allocation = allocator.Alloc(size); in TEST_F()
156 ArenaAllocator allocator(&pool); in TEST_F() local
159 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
162 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
169 ArenaAllocator allocator(&pool); in TEST_F() local
172 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
175 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
182 ArenaAllocator allocator(&pool); in TEST_F() local
185 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
188 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
195 ArenaAllocator allocator(&pool); in TEST_F() local
198 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
201 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
211 ArenaAllocator allocator(&pool); in TEST_F() local
215 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
218 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
225 ArenaAllocator allocator(&pool); in TEST_F() local
230 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
235 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
244 ArenaAllocator allocator(&pool); in TEST_F() local
247 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
251 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
254 void* after_alloc = allocator.Alloc(1); in TEST_F()
261 ArenaAllocator allocator(&pool); in TEST_F() local
264 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
268 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
271 void* after_alloc = allocator.Alloc(1); in TEST_F()
278 ArenaAllocator allocator(&pool); in TEST_F() local
281 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
285 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
288 void* after_alloc = allocator.Alloc(1); in TEST_F()
295 ArenaAllocator allocator(&pool); in TEST_F() local
298 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
302 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
305 void* after_alloc = allocator.Alloc(1); in TEST_F()
315 ArenaAllocator allocator(&pool); in TEST_F() local
319 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
323 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
326 void* after_alloc = allocator.Alloc(1); in TEST_F()
333 ArenaAllocator allocator(&pool); in TEST_F() local
338 void* original_allocation = allocator.Alloc(original_size); in TEST_F()
344 void* realloc_allocation = allocator.Realloc(original_allocation, original_size, new_size); in TEST_F()
347 void* after_alloc = allocator.Alloc(1); in TEST_F()