| 952 | |
| 953 | |
| 954 | mi_decl_nodiscard mi_decl_restrict extern inline void* mi_heap_alloc_new_n(mi_heap_t* heap, size_t count, size_t size) { |
| 955 | size_t total; |
| 956 | if mi_unlikely(mi_count_size_overflow(count, size, &total)) { |
| 957 | mi_try_new_handler(false); // on overflow we invoke the try_new_handler once to potentially throw std::bad_alloc |
| 958 | return NULL; |
| 959 | } |
| 960 | else { |
| 961 | return mi_heap_alloc_new(heap,total); |
| 962 | } |
no test coverage detected