Searched refs:ptrs (Results 1 – 5 of 5) sorted by relevance
54 void* ptrs[max_allocs]; in BenchmarkMalloc() local59 ptrs[entries[i].idx] = malloc(entries[i].size); in BenchmarkMalloc()62 reinterpret_cast<uint8_t*>(ptrs[entries[i].idx])[0] = 10; in BenchmarkMalloc()65 ptrs[entries[i].idx] = calloc(entries[i].arg2, entries[i].size); in BenchmarkMalloc()68 reinterpret_cast<uint8_t*>(ptrs[entries[i].idx])[0] = 20; in BenchmarkMalloc()71 ptrs[entries[i].idx] = memalign(entries[i].arg2, entries[i].size); in BenchmarkMalloc()74 reinterpret_cast<uint8_t*>(ptrs[entries[i].idx])[0] = 30; in BenchmarkMalloc()78 ptrs[entries[i].idx] = realloc(nullptr, entries[i].size); in BenchmarkMalloc()80 ptrs[entries[i].idx] = realloc(ptrs[entries[i].arg2 - 1], entries[i].size); in BenchmarkMalloc()84 reinterpret_cast<uint8_t*>(ptrs[entries[i].idx])[0] = 40; in BenchmarkMalloc()[all …]
46 std::vector<void*> ptrs; in BM_mallopt_purge() local55 ptrs.push_back(ptr); in BM_mallopt_purge()60 for (auto ptr : ptrs) { in BM_mallopt_purge()63 ptrs.clear(); in BM_mallopt_purge()
99 void* ptrs[numAllocs]; in MallocMultiple() local102 benchmark::DoNotOptimize(ptrs[i] = reinterpret_cast<uint8_t*>(malloc(nbytes))); in MallocMultiple()103 MakeAllocationResident(ptrs[i], nbytes, pagesize); in MallocMultiple()107 free(ptrs[i]); in MallocMultiple()
748 void* ptrs[kMaxAllocs] = {}; in TEST() local752 ptrs[i] = malloc(size); in TEST()753 ASSERT_TRUE(ptrs[i] != nullptr); in TEST()756 size_t usable_size = malloc_usable_size(ptrs[i]); in TEST()766 for (void* ptr : ptrs) { in TEST()832 void* ptrs[100]; in AndroidVerifyAlignment() local834 for (size_t i = 0; i < sizeof(ptrs) / sizeof(void*); i++) { in AndroidVerifyAlignment()835 ptrs[i] = malloc(alloc_size); in AndroidVerifyAlignment()836 ASSERT_TRUE(ptrs[i] != nullptr); in AndroidVerifyAlignment()837 ASSERT_EQ(0U, reinterpret_cast<uintptr_t>(ptrs[i]) & mask) in AndroidVerifyAlignment()[all …]
2562 static void AllocPtrsWithBacktrace(std::vector<void*>* ptrs) { in AllocPtrsWithBacktrace() argument2567 ptrs->push_back(ptr); in AllocPtrsWithBacktrace()2573 ptrs->push_back(ptr); in AllocPtrsWithBacktrace()2579 ptrs->push_back(ptr); in AllocPtrsWithBacktrace()2600 std::vector<void*> ptrs; in TEST_F() local2601 AllocPtrsWithBacktrace(&ptrs); in TEST_F()2614 for (auto ptr : ptrs) { in TEST_F()2617 ptrs.clear(); in TEST_F()2632 std::vector<void*> ptrs; in TEST_F() local2633 AllocPtrsWithBacktrace(&ptrs); in TEST_F()[all …]