Home
last modified time | relevance | path

Searched refs:elem_size (Results 1 – 3 of 3) sorted by relevance

/bionic/libc/bionic/
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()
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()
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()