Lines Matching refs:allocator
65 BionicAllocator allocator; in TEST() local
66 void* ptr = allocator.alloc(0); in TEST()
68 allocator.free(ptr); in TEST()
72 BionicAllocator allocator; in TEST() local
73 allocator.free(nullptr); in TEST()
77 BionicAllocator allocator; in TEST() local
78 uint32_t* array = reinterpret_cast<uint32_t*>(allocator.alloc(512)); in TEST()
92 uint32_t* reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 1024)); in TEST()
103 reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 62)); in TEST()
107 reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 4000)); in TEST()
119 reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 64000)); in TEST()
127 ASSERT_EQ(nullptr, allocator.realloc(reallocated_ptr, 0)); in TEST()
131 BionicAllocator allocator; in TEST() local
137 reinterpret_cast<test_struct_small*>(allocator.alloc(sizeof(test_struct_small))); in TEST()
139 reinterpret_cast<test_struct_small*>(allocator.alloc(sizeof(test_struct_small))); in TEST()
149 allocator.free(ptr1); in TEST()
150 allocator.free(ptr2); in TEST()
154 BionicAllocator allocator; in TEST() local
158 reinterpret_cast<test_struct_huge*>(allocator.alloc(sizeof(test_struct_huge))); in TEST()
160 reinterpret_cast<test_struct_huge*>(allocator.alloc(sizeof(test_struct_huge))); in TEST()
169 allocator.free(ptr2); in TEST()
170 allocator.free(ptr1); in TEST()
174 BionicAllocator allocator; in TEST() local
177 reinterpret_cast<test_struct_large*>(allocator.alloc(sizeof(test_struct_large))); in TEST()
179 reinterpret_cast<test_struct_large*>(allocator.alloc(1024)); in TEST()
194 reinterpret_cast<test_struct_large*>(allocator.alloc(sizeof(test_struct_large))); in TEST()
200 reinterpret_cast<test_struct_large*>(allocator.alloc(sizeof(test_struct_large))); in TEST()
205 allocator.free(ptr1); in TEST()
208 allocator.free(objects[i]); in TEST()
211 allocator.free(ptr2); in TEST()
212 allocator.free(ptr_to_free); in TEST()
216 BionicAllocator allocator; in TEST() local
220 ptr = allocator.memalign(0x100, 0x100); in TEST()
223 allocator.free(ptr); in TEST()
226 ptr = allocator.alloc(0x200); in TEST()
229 allocator.free(ptr); in TEST()
232 ptr = allocator.memalign(0x100, 0x10); in TEST()
235 allocator.free(ptr); in TEST()
239 BionicAllocator allocator; in TEST() local
243 ptr = allocator.memalign(0x100, 0x2000); in TEST()
246 allocator.free(ptr); in TEST()
249 ptr = allocator.memalign(0x1000, 0x2000); in TEST()
252 allocator.free(ptr); in TEST()
256 ptr = allocator.memalign(0x2000, 0x4000); in TEST()
259 allocator.free(ptr); in TEST()