Lines Matching refs:malloc

64 TEST(malloc, malloc_std) {  in TEST()  argument
66 void *ptr = malloc(100); in TEST()
72 TEST(malloc, malloc_overflow) { in TEST() argument
75 ASSERT_EQ(nullptr, malloc(SIZE_MAX)); in TEST()
79 TEST(malloc, calloc_std) { in TEST() argument
91 TEST(malloc, calloc_mem_init_disabled) { in TEST() argument
109 TEST(malloc, calloc_illegal) { in TEST() argument
116 TEST(malloc, calloc_overflow) { in TEST() argument
132 TEST(malloc, memalign_multiple) { in TEST() argument
147 TEST(malloc, memalign_overflow) { in TEST() argument
152 TEST(malloc, memalign_non_power2) { in TEST() argument
162 TEST(malloc, memalign_realloc) { in TEST() argument
198 TEST(malloc, malloc_realloc_larger) { in TEST() argument
200 char *ptr = (char *)malloc(100); in TEST()
214 TEST(malloc, malloc_realloc_smaller) { in TEST() argument
216 char *ptr = (char *)malloc(200); in TEST()
230 TEST(malloc, malloc_multiple_realloc) { in TEST() argument
232 char *ptr = (char *)malloc(200); in TEST()
268 TEST(malloc, calloc_realloc_larger) { in TEST() argument
283 TEST(malloc, calloc_realloc_smaller) { in TEST() argument
298 TEST(malloc, calloc_multiple_realloc) { in TEST() argument
335 TEST(malloc, realloc_overflow) { in TEST() argument
340 void* ptr = malloc(100); in TEST()
353 TEST(malloc, pvalloc_std) { in TEST() argument
366 TEST(malloc, pvalloc_overflow) { in TEST() argument
374 TEST(malloc, valloc_std) { in TEST() argument
386 TEST(malloc, valloc_overflow) { in TEST() argument
394 TEST(malloc, malloc_info) { in TEST() argument
461 TEST(malloc, malloc_info_matches_mallinfo) { in TEST() argument
529 TEST(malloc, calloc_usable_size) { in TEST() argument
531 void* pointer = malloc(size); in TEST()
548 TEST(malloc, malloc_0) { in TEST() argument
549 void* p = malloc(0); in TEST()
554 TEST(malloc, calloc_0_0) { in TEST() argument
560 TEST(malloc, calloc_0_1) { in TEST() argument
566 TEST(malloc, calloc_1_0) { in TEST() argument
572 TEST(malloc, realloc_nullptr_0) { in TEST() argument
579 TEST(malloc, realloc_0) { in TEST() argument
580 void* p = malloc(1024); in TEST()
590 TEST(malloc, verify_alignment) { in TEST() argument
599 filler[i] = malloc(1); in TEST()
602 values_32[i] = reinterpret_cast<uint32_t*>(malloc(sizeof(uint32_t))); in TEST()
613 filler[i] = malloc(1); in TEST()
616 values_64[i] = reinterpret_cast<uint64_t*>(malloc(sizeof(uint64_t))); in TEST()
627 filler[i] = malloc(1); in TEST()
630 values_ldouble[i] = reinterpret_cast<long double*>(malloc(sizeof(long double))); in TEST()
657 TEST(malloc, mallopt_smoke) { in TEST() argument
664 TEST(malloc, mallopt_decay) { in TEST() argument
677 TEST(malloc, mallopt_purge) { in TEST() argument
711 TEST(malloc, mallopt_scudo_only_options) { in TEST() argument
727 TEST(malloc, reallocarray_overflow) { in TEST() argument
745 TEST(malloc, reallocarray) { in TEST() argument
755 TEST(malloc, mallinfo) { in TEST() argument
774 ptrs[i] = malloc(size); in TEST()
831 types[i] = reinterpret_cast<Type*>(malloc(sizeof(Type))); in TestAllocateType()
857 ptrs[i] = malloc(alloc_size); in AndroidVerifyAlignment()
866 TEST(malloc, align_check) { in TEST() argument
914 TEST(malloc, DISABLED_alloc_after_fork) { in TEST() argument
931 DoNotOptimize(ptr = malloc(size)); in TEST()
945 DoNotOptimize(ptr = malloc(size)); in TEST()
1042 EXPECT_EXIT(CheckAllocationFunction([](size_t bytes) { return malloc(bytes) != nullptr; }), in TEST()
1056 void* p = malloc(1024 * 1024); in TEST()
1090 ptrs[i] = malloc(kAllocationSize); in GetMaxAllocations()
1106 ptrs[i] = malloc(kAllocationSize); in VerifyMaxPointers()
1111 ASSERT_TRUE(malloc(kAllocationSize) == nullptr); in VerifyMaxPointers()
1126 void* memory = malloc(10 * 1024 * 1024); in TEST()
1156 void* memory = malloc(80 * 1024 * 1024); in TEST()
1184 void* memory = malloc(60 * 1024 * 1024); in TEST()
1269 allocs.push_back(malloc(size)); in TestHeapZeroing()
1280 allocs.push_back(malloc(size)); in TestHeapZeroing()
1289 TEST(malloc, zero_init) { in TEST() argument
1322 TEST(malloc, disable_mte) { in TEST() argument
1356 TEST(malloc, allocation_slack) { in TEST() argument