MCPcopy Create free account
hub / github.com/beefytech/Beef / hpdata_init

Function hpdata_init

BeefRT/JEMalloc/src/hpdata.c:18–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18ph_gen(, hpdata_age_heap, hpdata_t, age_link, hpdata_age_comp)
19
20void
21hpdata_init(hpdata_t *hpdata, void *addr, uint64_t age) {
22 hpdata_addr_set(hpdata, addr);
23 hpdata_age_set(hpdata, age);
24 hpdata->h_huge = false;
25 hpdata->h_alloc_allowed = true;
26 hpdata->h_in_psset_alloc_container = false;
27 hpdata->h_purge_allowed = false;
28 hpdata->h_hugify_allowed = false;
29 hpdata->h_in_psset_hugify_container = false;
30 hpdata->h_mid_purge = false;
31 hpdata->h_mid_hugify = false;
32 hpdata->h_updating = false;
33 hpdata->h_in_psset = false;
34 hpdata_longest_free_range_set(hpdata, HUGEPAGE_PAGES);
35 hpdata->h_nactive = 0;
36 fb_init(hpdata->active_pages, HUGEPAGE_PAGES);
37 hpdata->h_ntouched = 0;
38 fb_init(hpdata->touched_pages, HUGEPAGE_PAGES);
39
40 hpdata_assert_consistent(hpdata);
41}
42
43void *
44hpdata_reserve_alloc(hpdata_t *hpdata, size_t sz) {

Callers 1

hpa_central_extractFunction · 0.85

Calls 5

hpdata_addr_setFunction · 0.85
hpdata_age_setFunction · 0.85
fb_initFunction · 0.85
hpdata_assert_consistentFunction · 0.85

Tested by

no test coverage detected