rename quarantine bitmap field for clarity

This commit is contained in:
Daniel Micay 2019-03-24 20:24:40 -04:00
parent 3d142eb4c2
commit 13de480bde

View File

@ -88,7 +88,7 @@ struct slab_metadata {
u16 count; u16 count;
#endif #endif
#if SLAB_QUARANTINE #if SLAB_QUARANTINE
u64 quarantine[4]; u64 quarantine_bitmap[4];
#endif #endif
}; };
@ -315,17 +315,17 @@ static bool get_slot(struct slab_metadata *metadata, size_t index) {
#if SLAB_QUARANTINE #if SLAB_QUARANTINE
static void set_quarantine(struct slab_metadata *metadata, size_t index) { static void set_quarantine(struct slab_metadata *metadata, size_t index) {
size_t bucket = index / 64; size_t bucket = index / 64;
metadata->quarantine[bucket] |= 1UL << (index - bucket * 64); metadata->quarantine_bitmap[bucket] |= 1UL << (index - bucket * 64);
} }
static void clear_quarantine(struct slab_metadata *metadata, size_t index) { static void clear_quarantine(struct slab_metadata *metadata, size_t index) {
size_t bucket = index / 64; size_t bucket = index / 64;
metadata->quarantine[bucket] &= ~(1UL << (index - bucket * 64)); metadata->quarantine_bitmap[bucket] &= ~(1UL << (index - bucket * 64));
} }
static bool get_quarantine(struct slab_metadata *metadata, size_t index) { static bool get_quarantine(struct slab_metadata *metadata, size_t index) {
size_t bucket = index / 64; size_t bucket = index / 64;
return (metadata->quarantine[bucket] >> (index - bucket * 64)) & 1UL; return (metadata->quarantine_bitmap[bucket] >> (index - bucket * 64)) & 1UL;
} }
#endif #endif