From 3624dd42ffd88e63a8f7c2ee0a6ed3cbdfff81b7 Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Thu, 28 Jan 2021 13:19:41 -0800 Subject: [PATCH] hpdata: Add a comment for hpdata_consistent. --- include/jemalloc/internal/hpdata.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/jemalloc/internal/hpdata.h b/include/jemalloc/internal/hpdata.h index fdd6673f..65cd073f 100644 --- a/include/jemalloc/internal/hpdata.h +++ b/include/jemalloc/internal/hpdata.h @@ -112,6 +112,11 @@ hpdata_assert_empty(hpdata_t *hpdata) { assert(hpdata_nfree_get(hpdata) == HUGEPAGE_PAGES); } +/* + * Only used in tests, and in hpdata_assert_consistent, below. Verifies some + * consistency properties of the hpdata (e.g. that cached counts of page stats + * match computed ones). + */ static inline bool hpdata_consistent(hpdata_t *hpdata) { if(fb_urange_longest(hpdata->active_pages, HUGEPAGE_PAGES)