Memory management method and apparatus
A memory management and memory technology, applied in the field of communication, can solve problems affecting memory allocation performance and low memory recycling rate, and achieve the effects of improving user experience, speed and success rate, and improving efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment approach
[0066] Mode 1. For each page frame (page frame) in the Least Recently Used (LRU) linked list of the memory, if it is determined that the page frame is dirty and allows write-back, or allows swapping out, determine the The memory pages in the page frame are memory pages that need to be swapped out.
[0067] Wherein, writing back refers to writing the data of the memory page back to the file system, and swapping out refers to exchanging the data of the memory page to the swap partition.
[0068] In this method, the page frames in each LRU linked list are scanned sequentially, and if it is determined that the page frame is dirty and allows write-back, or allows swapping out, then determine the memory page stored in the page frame as the memory page that needs to be swapped out . Among them, the page frame that allows write-back and is dirty refers to the page frame that has been modified after the file is loaded into the memory and has not been synchronized to the file system. W...
Embodiment 1
[0080] Embodiment 1, please refer to image 3 , is a schematic diagram of the page swapping process described in this embodiment, including the following process:
[0081] Step 301, scanning the page frames in each LRU linked list;
[0082] Step 302. For each page frame, determine whether the set conditions are satisfied, wherein the set conditions include all mapping relationships indicating that the page frame is to be reclaimed forcibly and need to be removed, or the page frame is dirty and allows write-back, or allows swap out;
[0083] If yes, execute step 303;
[0084] If not, then execute step 308;
[0085] Step 303, using the page frame descriptor (struct page), scan control structure information (struct scan_control) and ttu_flag as parameters, and using the encapsulated single page frame recovery function as a work function to generate a work task corresponding to the page frame;
[0086] Step 304, traversing all available CPUs in the system, searching for a CPU ...
Embodiment 2
[0113] Example 2, please refer to Figure 5 , is a schematic diagram of the page swapping process described in this embodiment, including the following process:
[0114] Step 501, traversing page directories and page tables at all levels corresponding to each VMA of the process, and filtering out page table entries whose pages are not in memory;
[0115] Step 502, judging whether the current VMA has been traversed and the isolated page linked list is not empty;
[0116] If so, then execute step 505;
[0117] If not, then execute step 503;
[0118] Step 503, isolate the page frame corresponding to each page table item corresponding to the current VMA from the LRU linked list, and add the page frame descriptor of the isolated page frame to the isolated page linked list;
[0119] Step 504, check whether the number of page frames in the isolation page linked list reaches the number of pages exchanged at a time, and the number of pages exchanged at a time is generally 32 by defa...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com