Lines Matching refs:bm
760 _kvm_bitmap_init(struct kvm_bitmap *bm, u_long bitmapsize, u_long *idx) in _kvm_bitmap_init() argument
764 bm->map = calloc(bitmapsize, sizeof *bm->map); in _kvm_bitmap_init()
765 if (bm->map == NULL) in _kvm_bitmap_init()
767 bm->size = bitmapsize; in _kvm_bitmap_init()
772 _kvm_bitmap_set(struct kvm_bitmap *bm, u_long bm_index) in _kvm_bitmap_set() argument
774 uint8_t *byte = &bm->map[bm_index / 8]; in _kvm_bitmap_set()
776 if (bm_index / 8 < bm->size) in _kvm_bitmap_set()
781 _kvm_bitmap_next(struct kvm_bitmap *bm, u_long *idx) in _kvm_bitmap_next() argument
783 u_long first_invalid = bm->size * CHAR_BIT; in _kvm_bitmap_next()
793 if ((bm->map[*idx / CHAR_BIT] & mask) != 0) in _kvm_bitmap_next()
801 _kvm_bitmap_deinit(struct kvm_bitmap *bm) in _kvm_bitmap_deinit() argument
804 free(bm->map); in _kvm_bitmap_deinit()