1BITMAP_FIND_FREE_REG(9) Basic Kernel Library Functions BITMAP_FIND_FREE_REG(9)
2
3
4

NAME

6       bitmap_find_free_region - find a contiguous aligned mem region
7

SYNOPSIS

9       int bitmap_find_free_region(unsigned long * bitmap, int bits,
10                                   int order);
11

ARGUMENTS

13       bitmap
14           array of unsigned longs corresponding to the bitmap
15
16       bits
17           number of bits in the bitmap
18
19       order
20           region size (log base 2 of number of bits) to find
21

DESCRIPTION

23       Find a region of free (zero) bits in a bitmap of bits bits and allocate
24       them (set them to one). Only consider regions of length a power (order)
25       of two, aligned to that power of two, which makes the search algorithm
26       much faster.
27
28       Return the bit offset in bitmap of the allocated region, or -errno on
29       failure.
30
32Kernel Hackers Manual 3.10         June 2019           BITMAP_FIND_FREE_REG(9)
Impressum