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:
committed by
Qi Wang
parent
c1d3ad4674
commit
6d4aa33753
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user