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:
parent
a13a044c17
commit
a6bd733db9
|
@ -249,10 +249,11 @@
|
||||||
#define BITSET_FSET(n) \
|
#define BITSET_FSET(n) \
|
||||||
[ 0 ... ((n) - 1) ] = (-1L)
|
[ 0 ... ((n) - 1) ] = (-1L)
|
||||||
|
|
||||||
|
#define BITSET_SIZE(_s) (__bitset_words((_s)) * sizeof(long))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dynamically allocate a bitset.
|
* Dynamically allocate a bitset.
|
||||||
*/
|
*/
|
||||||
#define BITSET_ALLOC(_s, mt, mf) \
|
#define BITSET_ALLOC(_s, mt, mf) malloc(BITSET_SIZE((_s)), mt, (mf))
|
||||||
malloc(__bitset_words(_s) * sizeof(long), mt, (mf))
|
|
||||||
|
|
||||||
#endif /* !_SYS_BITSET_H_ */
|
#endif /* !_SYS_BITSET_H_ */
|
||||||
|
|
Loading…
Reference in New Issue