MCPcopy Create free account
hub / github.com/codr7/hacktical-c / run_bump

Function run_bump

malloc2/benchmarks.c:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25static 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
38static void run_slab() {
39 struct hc_slab_alloc a;

Callers 1

malloc2_benchmarksFunction · 0.85

Calls 4

hc_bump_alloc_initFunction · 0.85
hc_nowFunction · 0.85
hc_bump_alloc_deinitFunction · 0.85
hc_time_printFunction · 0.85

Tested by

no test coverage detected