函数逻辑报告 | 
Source Code:mm\page_alloc.c | 
Create Date:2022-07-27 16:33:26 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:Freeing function for a buddy system allocator
函数原型:static inline void __free_one_page(struct page *page, unsigned long pfn, struct zone *zone, unsigned int order, int migratetype)
返回类型:void
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct page * | page | |
| unsigned long | pfn | |
| struct zone * | zone | |
| unsigned int | order | |
| int | migratetype | 
| 910 | VM_BUG_ON(!zone_is_initialized(zone)) | 
| 911 | VM_BUG_ON_PAGE(体系结构无关页的属性 & Flags checked when a page is prepped for return by the page allocator, page) | 
| 913 | VM_BUG_ON(migratetype == - 1) | 
| 914 | 如果此条件成立可能性大(为编译器优化)(!is_migrate_isolate(migratetype))则__mod_zone_freepage_state(zone, 1 << order, migratetype) | 
| 917 | VM_BUG_ON_PAGE(pfn & ((1 << order) - 1), page) | 
| 918 | VM_BUG_ON_PAGE(bad_range(zone, page), page) | 
| 920 | continue_merging : | 
| 922 | 如果compaction_capture(capc, page, order, migratetype)则 | 
| 923 | __mod_zone_freepage_state(zone, - (1 << order), migratetype) | 
| 925 | 返回 | 
| 927 | buddy_pfn等于Locate the struct page for both the matching buddy in our* pair (buddy1) and the combined O(n+1) page they form (page) | 
| 930 | 如果非pfn_valid_within(buddy_pfn)则转到:done_merging | 
| 938 | 如果page_is_guard(buddy)则clear_page_guard(zone, buddy, order, migratetype) | 
| 940 | 否则del_page_from_free_area(buddy, & 伙伴系统空闲内存页[order]) | 
| 942 | combined_pfn等于buddy_pfn按位与pfn | 
| 943 | page等于page加combined_pfn减pfn | 
| 944 | pfn等于combined_pfn | 
| 945 | order自加 | 
| 956 | 如果此条件成立可能性小(为编译器优化)(has_isolate_pageblock(zone))则 | 
| 968 | max_order自加 | 
| 969 | 转到:continue_merging | 
| 972 | done_merging : | 
| 973 | set_page_order(page, order) | 
| 986 | combined_pfn等于buddy_pfn按位与pfn | 
| 987 | higher_page等于page加combined_pfn减pfn | 
| 988 | buddy_pfn等于Locate the struct page for both the matching buddy in our* pair (buddy1) and the combined O(n+1) page they form (page) | 
| 994 | 返回 | 
| 998 | 如果is_shuffle_order(order)则add_to_free_area_random(page, & 伙伴系统空闲内存页[order], migratetype) | 
| 名称 | 描述 | 
|---|---|
| free_pcppages_bulk | Frees a number of pages from the PCP lists* Assumes all pages on list are in same zone, and of same order.* count is the number of pages to free.* If the zone was previously in an "all pages pinned" state then look to | 
| free_one_page | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |