Use a precise bit count for the slab free items in UMA.

This significantly shrinks embedded slab structures.

Reviewed by:	markj, rlibby (prior version)
Differential Revision:	https://reviews.freebsd.org/D22584
This commit is contained in:
Jeff Roberson 2019-12-02 22:44:34 +00:00 committed by Sebastian Huber
parent a13a044c17
commit a6bd733db9
1 changed files with 3 additions and 2 deletions

View File

@ -249,10 +249,11 @@
#define BITSET_FSET(n) \
[ 0 ... ((n) - 1) ] = (-1L)
#define BITSET_SIZE(_s) (__bitset_words((_s)) * sizeof(long))
/*
* Dynamically allocate a bitset.
*/
#define BITSET_ALLOC(_s, mt, mf) \
malloc(__bitset_words(_s) * sizeof(long), mt, (mf))
#define BITSET_ALLOC(_s, mt, mf) malloc(BITSET_SIZE((_s)), mt, (mf))
#endif /* !_SYS_BITSET_H_ */