| 238 | |
| 239 | #if MI_STAT>1 |
| 240 | static void mi_stats_print_bins(const mi_stat_count_t* bins, size_t max, const char* fmt, mi_output_fun* out, void* arg) { |
| 241 | bool found = false; |
| 242 | char buf[64]; |
| 243 | for (size_t i = 0; i <= max; i++) { |
| 244 | if (bins[i].allocated > 0) { |
| 245 | found = true; |
| 246 | int64_t unit = _mi_bin_size((uint8_t)i); |
| 247 | snprintf(buf, 64, "%s %3lu", fmt, (long)i); |
| 248 | mi_stat_print(&bins[i], buf, unit, out, arg); |
| 249 | } |
| 250 | } |
| 251 | if (found) { |
| 252 | _mi_fprintf(out, arg, "\n"); |
| 253 | mi_print_header(out, arg); |
| 254 | } |
| 255 | } |
| 256 | #endif |
| 257 | |
| 258 |
no test coverage detected