Home
last modified time | relevance | path

Searched refs:n_elements (Results 1 – 7 of 7) sorted by relevance

/aosp12/bionic/libc/bionic/
H A Dmalloc_limit.cpp47 static void* LimitCalloc(size_t n_elements, size_t elem_size);
114 void* LimitCalloc(size_t n_elements, size_t elem_size) { in LimitCalloc() argument
116 if (__builtin_mul_overflow(n_elements, elem_size, &total) || !CheckLimit(total)) { in LimitCalloc()
117 warning_log("malloc_limit: calloc(%zu, %zu) exceeds limit %" PRId64, n_elements, elem_size, in LimitCalloc()
123 return IncrementLimit(dispatch_table->calloc(n_elements, elem_size)); in LimitCalloc()
125 return IncrementLimit(Malloc(calloc)(n_elements, elem_size)); in LimitCalloc()
H A Dgwp_asan_wrappers.cpp110 void* gwp_asan_calloc(size_t n_elements, size_t elem_size) { in gwp_asan_calloc() argument
113 if (!__builtin_mul_overflow(n_elements, elem_size, &bytes)) { in gwp_asan_calloc()
119 return prev_dispatch->calloc(n_elements, elem_size); in gwp_asan_calloc()
H A Dmalloc_common.cpp66 extern "C" void* calloc(size_t n_elements, size_t elem_size) { in calloc() argument
69 return MaybeTagPointer(dispatch_table->calloc(n_elements, elem_size)); in calloc()
71 void* result = Malloc(calloc)(n_elements, elem_size); in calloc()
73 warning_log("calloc(%zu, %zu) failed: returning null pointer", n_elements, elem_size); in calloc()
/aosp12/system/extras/memory_replay/
H A DAlloc.cpp58 if (sscanf(line_end, "%" SCNd64 " %zu", &entry->u.n_elements, &entry->size) != 2) { in AllocGetData()
114 void* memory = calloc(entry.u.n_elements, entry.size); in CallocExecute()
115 MakeAllocationResident(memory, entry.u.n_elements * entry.size, pagesize); in CallocExecute()
H A DAlloc.h40 uint64_t n_elements; member
H A DTraceBenchmark.cpp178 ptr = calloc(entry.u.n_elements, entry.size); in RunTrace()
/aosp12/system/extras/memory_replay/tests/
H A DAllocTest.cpp70 EXPECT_EQ(50U, entry.u.n_elements); in TEST()