mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
HPA: Correctly calculate retained pages
Retained pages are those which haven't been touched and are unbacked from OS perspective. For a pageslab their number should equal "total pages in slab" minus "touched pages".
This commit is contained in:
parent
2c625d5cd9
commit
c01a885e94
1 changed files with 1 additions and 1 deletions
|
|
@ -292,7 +292,7 @@ hpdata_ndirty_get(hpdata_t *hpdata) {
|
|||
|
||||
static inline size_t
|
||||
hpdata_nretained_get(hpdata_t *hpdata) {
|
||||
return hpdata->h_nactive - hpdata->h_ntouched;
|
||||
return HUGEPAGE_PAGES - hpdata->h_ntouched;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue