/* RETURN VALUES: starting bit number of free bits.  */
static int dbFindBits(u32 word, int l2nb)
/* RETURN VALUES: starting bit number of free bits.  */
static int dbFindBits(u32 word, int l2nb)
{
	int bitno, nb;
	u32 mask;
	nb = 1 << l2nb;
	assert(nb <= DBWORD);
	word = ~word;
	mask = ONES << (DBWORD - nb);
	for (bitno = 0; mask != 0; bitno += nb, mask >>= nb) {
		if ((mask & word) == mask)
			break;
	}
	ASSERT(bitno < 32);
	return (bitno);
}