The *_meta_* functions include a radix parameter, a blk parameter, and another parameter that identifies a starting point in the memory address block. Radix is a power of two, blk is a multiple of radix, and the starting point is in the range [blk, blk+radix), so that blk can always be computed from the other two. This change drops the blk parameter from the meta functions and computes it instead. It also makes the radix parameters unsigned to address concerns that the calculation of '-radix' might overflow, or have an unexpected bit representation on peculiar machines.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
This change doesn't compile:
../../../kern/subr_blist.c:457:46: error: too few arguments to function call, expected 4, have 3 return (blst_leaf_alloc(scan, cursor, count)); ~~~~~~~~~~~~~~~ ^ ../../../kern/subr_blist.c:358:1: note: 'blst_leaf_alloc' declared here static daddr_t ^ 1 error generated.
Comment Actions
This change reduces the text size by 7% on amd64.
Before:
# size subr_blist.o text data bss dec hex filename 3805 80 0 3885 0xf2d subr_blist.o
After:
# size subr_blist.o text data bss dec hex filename 3532 80 0 3612 0xe1c subr_blist.o