Use the flat bitmap for eset and psset bitmaps.

This is simpler (note that the eset field comment was actually incorrect!), and
slightly faster.
This commit is contained in:
David Goldblatt
2021-02-08 11:04:46 -08:00
committed by David Goldblatt
parent 271a676dcd
commit 154aa5fcc1
4 changed files with 21 additions and 27 deletions

View File

@@ -2,7 +2,7 @@
#define JEMALLOC_INTERNAL_ESET_H
#include "jemalloc/internal/atomic.h"
#include "jemalloc/internal/bitmap.h"
#include "jemalloc/internal/flat_bitmap.h"
#include "jemalloc/internal/edata.h"
#include "jemalloc/internal/mutex.h"
@@ -22,7 +22,7 @@ struct eset_s {
atomic_zu_t nbytes[SC_NPSIZES + 1];
/* Bitmap for which set bits correspond to non-empty heaps. */
bitmap_t bitmap[BITMAP_GROUPS(SC_NPSIZES + 1)];
fb_group_t bitmap[FB_NGROUPS(SC_NPSIZES + 1)];
/* LRU of all extents in heaps. */
edata_list_inactive_t lru;

View File

@@ -56,7 +56,8 @@ struct psset_s {
* free run of pages in a pageslab.
*/
hpdata_age_heap_t pageslabs[PSSET_NPSIZES];
bitmap_t bitmap[BITMAP_GROUPS(PSSET_NPSIZES)];
/* Bitmap for which set bits correspond to non-empty heaps. */
fb_group_t bitmap[FB_NGROUPS(PSSET_NPSIZES)];
/*
* The sum of all bin stats in stats. This lets us quickly answer
* queries for the number of dirty, active, and retained pages in the