Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\genalloc.c Create Date:2022-07-28 06:57:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:gen_pool_best_fit - find the best fitting region of memory* macthing the size requirement (no alignment constraint)*@map: The address to base the search on*@size: The bitmap size in bits*@start: The bitnumber to start searching at*@nr: The number of

Proto:unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, unsigned long start, unsigned int nr, void *data, struct gen_pool *pool, unsigned long start_addr)

Type:unsigned long

Parameter:

TypeParameterName
unsigned long *map
unsigned longsize
unsigned longstart
unsigned intnr
void *data
struct gen_pool *pool
unsigned longstart_addr
751  start_bit = size
752  len = size + 1
755  index = map_find_next_zero_area - find a contiguous aligned zero area*@map: The address to base the search on*@size: The bitmap size in bits*@start: The bitnumber to start searching at*@nr: The number of zeroed bits we're looking for*@align_mask: Alignment mask
757  When index < size cycle
758  next_bit = Find the next set bit in a memory region.
759  If next_bit - index < len Then
760  len = next_bit - index
761  start_bit = index
762  If len == nr Then Return start_bit
765  index = map_find_next_zero_area - find a contiguous aligned zero area*@map: The address to base the search on*@size: The bitmap size in bits*@start: The bitnumber to start searching at*@nr: The number of zeroed bits we're looking for*@align_mask: Alignment mask
769  Return start_bit