函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:calculate_order

函数原型:static inline int calculate_order(unsigned int size)

返回类型:int

参数:

类型参数名称
unsigned intsize
3286  min_objects等于slub_min_objects
3287  如果非min_objectsmin_objects等于4乘ls - find last set bit in word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffs, but returns the position of the most significant set bit.* fls(value) returns 0 if value is 0 or the position of the last加1的和
3289  max_objects等于order_objects(slub_max_order, size)
3290  min_objects等于两数取小(min_objects, max_objects)
3292 min_objects大于1循环
3295  fraction等于16
3296 fraction大于等于4循环
3299  如果order小于等于slub_max_order则返回:order
3301  fraction除等于2
3303  min_objects自减
3310  order等于Calculate the order of allocation given an slab object size.* The order of allocation has significant impact on performance and other* system components. Generally order 0 allocations should be preferred since
3311  如果order小于等于slub_max_order则返回:order
3317  order等于Calculate the order of allocation given an slab object size.* The order of allocation has significant impact on performance and other* system components. Generally order 0 allocations should be preferred since
3318  如果order小于Free memory management - zoned buddy allocator. 则返回:order
3320  返回:负ENOSYS
调用者
名称描述
calculate_sizesalculate_sizes() determines the order and the distribution of data within* a slab object.