函数逻辑报告 |
Source Code:kernel\power\snapshot.c |
Create Date:2022-07-27 11:01:20 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:hibernate_preallocate_memory - Preallocate memory for hibernation image
函数原型:int hibernate_preallocate_memory(void)
返回类型:int
参数:无
1703 | pages等于0 |
1708 | 打印信息("Preallocating image memory... ") |
1723 | save_highmem等于count_highmem_pages() |
1731 | saveable加等于save_highmem |
1732 | highmem等于save_highmem |
1733 | size等于0 |
1734 | do nothing (zone) |
1738 | 否则count加等于zone_page_state(zone, NR_FREE_PAGES) |
1741 | avail_normal等于count |
1743 | count减等于linux/mm/page_alloc.c |
1746 | size加等于page_key_additional_pages(saveable) |
1762 | pages加等于preallocate_image_memory(saveable - pages, avail_normal) |
1763 | 转到:out |
1773 | 如果avail_normal大于pages则avail_normal减等于pages |
1775 | 否则avail_normal等于0 |
1777 | 如果size小于pages则size等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedlong, pages, max_size) |
1786 | shrink_all_memory(saveable - size) |
1795 | pages_highmem等于preallocate_image_highmem(highmem / 2) |
1797 | 如果alloc大于pages_highmem则alloc减等于pages_highmem |
1799 | 否则alloc等于0 |
1805 | pages加等于pages_highmem |
1807 | 如果pages_highmem小于alloc则转到:err_out |
1809 | pages加等于pages_highmem |
1815 | pages加等于preallocate_image_highmem(alloc) |
1816 | 否则 |
1822 | size等于preallocate_highmem_fraction(alloc, highmem, count) |
1823 | pages_highmem加等于size |
1826 | pages_highmem加等于preallocate_image_highmem(alloc - size) |
1827 | pages加等于pages_highmem加size |
1837 | out : |
1842 | 返回:0 |
1844 | err_out : |
1845 | 打印标准信息("\n") |
1847 | 返回:负ENOMEM |
名称 | 描述 |
---|---|
hibernation_snapshot | hibernation_snapshot - Quiesce devices and create a hibernation image.*@platform_mode: If set, use platform driver to prepare for the transition.* This routine must be called with system_transition_mutex held. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |