bitmap_find_free_region — find a contiguous aligned mem region
|unsigned long * bitmap,|
|unsigned int bits,|
unsigned long * bitmap
array of unsigned longs corresponding to the bitmap
unsigned int bits
number of bits in the bitmap
region size (log base 2 of number of bits) to find
Find a region of free (zero) bits in a
bits bits and
allocate them (set them to one). Only consider regions of length
a power (
order) of two, aligned to that power of two, which
makes the search algorithm much faster.
Return the bit offset in bitmap of the allocated region, or -errno on failure.