Extract the calculation of psset heap assignment for an hpdata into a common function

This is in preparation for upcoming changes I plan to make to this
logic. Extracting it into a common function will make this easier and
less error-prone, and cleans up the existing code regardless.
This commit is contained in:
Kevin Svetlitski
2023-05-27 14:21:11 -07:00
committed by Qi Wang
parent c1d3ad4674
commit 6d4aa33753
2 changed files with 21 additions and 30 deletions

View File

@@ -343,12 +343,12 @@ hpdata_assert_consistent(hpdata_t *hpdata) {
}
static inline bool
hpdata_empty(hpdata_t *hpdata) {
hpdata_empty(const hpdata_t *hpdata) {
return hpdata->h_nactive == 0;
}
static inline bool
hpdata_full(hpdata_t *hpdata) {
hpdata_full(const hpdata_t *hpdata) {
return hpdata->h_nactive == HUGEPAGE_PAGES;
}