rename quarantine bitmap field for clarity
parent
3d142eb4c2
commit
13de480bde
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue