| 16 | } |
| 17 | |
| 18 | ph_gen(, hpdata_age_heap, hpdata_t, age_link, hpdata_age_comp) |
| 19 | |
| 20 | void |
| 21 | hpdata_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 | |
| 43 | void * |
| 44 | hpdata_reserve_alloc(hpdata_t *hpdata, size_t sz) { |
no test coverage detected