函数逻辑报告 |
Source Code:mm\page_alloc.c |
Create Date:2022-07-27 16:33:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:free_pages_prepare
函数原型:static __always_inline bool free_pages_prepare(struct page *page, unsigned int order, bool check_free)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | page | |
unsigned int | order | |
bool | check_free |
1124 | bad等于0 |
1126 | VM_BUG_ON_PAGE(PageTail(page), page) |
1128 | trace_mm_page_free(page, order) |
1134 | 如果此条件成立可能性小(为编译器优化)(order)则 |
1135 | compound等于PageCompound(page) |
1138 | VM_BUG_ON_PAGE(compound && compound_order(page) != order, page) |
1140 | 如果compound则ClearPageDoubleMap(page) |
1145 | 如果此条件成立可能性小(为编译器优化)(free_pages_check(page + i))则 |
1146 | bad自加 |
1147 | 继续下一循环 |
1152 | 如果PageMappingFlags(page)则 See page-flags.h for PAGE_MAPPING_FLAGS = NULL |
1154 | 如果memcg_kmem_enabled()且If kmemcg is enabled, the buddy allocator will set PageKmemcg() on* pages allocated with __GFP_ACCOUNT. It gets cleared on page free.则__memcg_kmem_uncharge(page, order) |
1156 | 如果check_free则bad加等于free_pages_check(page) |
1158 | 如果bad则返回:false |
1161 | page_cpupid_reset_last(page) |
1163 | reset_page_owner(page, order) |
1165 | 如果非PageHighMem(page)则 |
1168 | debug_check_no_obj_freed(page_address(page), PAGE_SIZE << order) |
1171 | 如果want_init_on_free()则kernel_init_free_pages(page, 1 << order) |
1174 | kernel_poison_pages(page, 1 << order, 0) |
1180 | arch_free_page(page, order) |
1182 | 如果For use in fast paths after init_debug_pagealloc() has run, or when a* false negative result is not harmful when called too early.则kernel_map_pages(page, 1 << order, 0) |
1187 | 返回:true |
名称 | 描述 |
---|---|
free_pcp_prepare | With DEBUG_VM disabled, order-0 pages being freed are checked only when* moving from pcp lists to free list in order to reduce overhead. With* debug_pagealloc enabled, they are checked also immediately when being freed* to the pcp lists. |
__free_pages_ok |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |