Home
last modified time | relevance | path

Searched refs:allocs (Results 1 – 4 of 4) sorted by relevance

/bionic/tests/
Dmalloc_iterate_test.cpp49 std::vector<AllocDataType> allocs; member
53 test_data->allocs.resize(test_data->allocs.size() + 1); in AllocPtr()
54 AllocDataType* alloc = &test_data->allocs.back(); in AllocPtr()
64 for (size_t i = 0; i < test_data->allocs.size(); i++) { in FreePtrs()
65 free(test_data->allocs[i].ptr); in FreePtrs()
80 for (size_t i = 0; i < test_data->allocs.size(); i++) { in SavePointers()
81 uintptr_t ptr = reinterpret_cast<uintptr_t>(test_data->allocs[i].ptr); in SavePointers()
83 test_data->allocs[i].count++; in SavePointers()
86 if (max_size > test_data->allocs[i].size) { in SavePointers()
87 test_data->allocs[i].size_reported = test_data->allocs[i].size; in SavePointers()
[all …]
Dcfi_test.cpp81 std::vector<void*> allocs; in test_cfi_slowpath_with_alloc() local
83 allocs.push_back(malloc(4096)); in test_cfi_slowpath_with_alloc()
84 __cfi_slowpath(46, allocs.back()); in test_cfi_slowpath_with_alloc()
Dmalloc_test.cpp1438 std::vector<void*> allocs; in TestHeapZeroing() local
1444 allocs.push_back(malloc(size)); in TestHeapZeroing()
1445 memset(allocs.back(), 'X', std::min(size, kMaxBytesToCheckZero)); in TestHeapZeroing()
1448 for (void* alloc : allocs) { in TestHeapZeroing()
1451 allocs.clear(); in TestHeapZeroing()
1455 allocs.push_back(malloc(size)); in TestHeapZeroing()
1456 ASSERT_EQ(0, memcmp(allocs.back(), kBlankMemory, std::min(size, kMaxBytesToCheckZero))); in TestHeapZeroing()
1459 for (void* alloc : allocs) { in TestHeapZeroing()
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_system_tests.cpp670 std::vector<std::vector<void*>> allocs(kMaxThreads); in TEST() local
677 allocs[i].push_back(ptr); in TEST()
682 std::thread malloc_thread([&thread_mask, &run, &allocs, i] { in TEST()
686 for (auto ptr : allocs[i]) { in TEST()