函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\genalloc.c Create Date:2022-07-27 07:54:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型: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)

返回类型:unsigned long

参数:

类型参数名称
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 index小于size循环
758  next_bit等于在内存区域中找到下一个设置位
759  如果next_bitindex小于len
760  len等于next_bitindex
761  start_bit等于index
762  如果len恒等于nr则返回: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  返回:start_bit