Function report |
Source Code:kernel\power\snapshot.c |
Create Date:2022-07-28 10:01:07 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:_unnecessary_pages - Release preallocated pages not needed for the image.
Proto:static unsigned long free_unnecessary_pages(void)
Type:unsigned long
Parameter:Nothing
1605 | to_free_normal = Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices. - save |
1606 | save = 0 |
1607 | Else |
1608 | to_free_normal = 0 |
1611 | save += count_highmem_pages() |
1614 | Else |
1615 | to_free_highmem = 0 |
1616 | save -= Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices. |
1617 | If to_free_normal > save Then to_free_normal -= save |
1619 | Else to_free_normal = 0 |
1622 | free = to_free_normal + to_free_highmem |
1626 | When to_free_normal > 0 || to_free_highmem > 0 cycle |
1628 | page = pfn_to_page(pfn) |
1630 | If PageHighMem(page) Then |
1631 | If Not to_free_highmem Then Continue |
1633 | to_free_highmem-- |
1635 | Else |
1636 | If Not to_free_normal Then Continue |
1638 | to_free_normal-- |
1643 | swsusp_unset_page_free(page) |
1644 | __free_page(page) |
1647 | Return free |
Name | Describe |
---|---|
hibernate_preallocate_memory | hibernate_preallocate_memory - Preallocate memory for hibernation image |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |