Lines Matching refs:binfo
9 bitmap_info_init(bitmap_info_t *binfo, size_t nbits)
22 binfo->levels[0].group_offset = 0;
26 binfo->levels[i].group_offset = binfo->levels[i-1].group_offset
30 binfo->levels[i].group_offset = binfo->levels[i-1].group_offset
32 assert(binfo->levels[i].group_offset <= BITMAP_GROUPS_MAX);
33 binfo->nlevels = i;
34 binfo->nbits = nbits;
38 bitmap_info_ngroups(const bitmap_info_t *binfo)
41 return (binfo->levels[binfo->nlevels].group_offset);
45 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo)
57 memset(bitmap, 0xffU, bitmap_size(binfo));
58 extra = (BITMAP_GROUP_NBITS - (binfo->nbits & BITMAP_GROUP_NBITS_MASK))
61 bitmap[binfo->levels[1].group_offset - 1] >>= extra;
62 for (i = 1; i < binfo->nlevels; i++) {
63 size_t group_count = binfo->levels[i].group_offset -
64 binfo->levels[i-1].group_offset;
68 bitmap[binfo->levels[i+1].group_offset - 1] >>= extra;
75 bitmap_info_init(bitmap_info_t *binfo, size_t nbits)
85 binfo->ngroups = i;
86 binfo->nbits = nbits;
90 bitmap_info_ngroups(const bitmap_info_t *binfo)
93 return (binfo->ngroups);
97 bitmap_init(bitmap_t *bitmap, const bitmap_info_t *binfo)
101 memset(bitmap, 0xffU, bitmap_size(binfo));
102 extra = (binfo->nbits % (binfo->ngroups * BITMAP_GROUP_NBITS));
104 bitmap[binfo->ngroups - 1] >>= (BITMAP_GROUP_NBITS - extra);
110 bitmap_size(const bitmap_info_t *binfo)
113 return (bitmap_info_ngroups(binfo) << LG_SIZEOF_BITMAP);