| 23 | } |
| 24 | |
| 25 | static void run_bump() { |
| 26 | struct hc_bump_alloc a; |
| 27 | hc_bump_alloc_init(&a, &hc_malloc_default, N * MAX_SIZE); |
| 28 | hc_time_t t = hc_now(); |
| 29 | |
| 30 | for (int i = 0; i < N; i++) { |
| 31 | hc_acquire(&a.malloc, GET_SIZE()); |
| 32 | } |
| 33 | |
| 34 | hc_bump_alloc_deinit(&a); |
| 35 | hc_time_print(&t, "bump: "); |
| 36 | } |
| 37 | |
| 38 | static void run_slab() { |
| 39 | struct hc_slab_alloc a; |
no test coverage detected