Memory reclaiming method and apparatus

US10901890B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10901890-B2
Application numberUS-201816171304-A
CountryUS
Kind codeB2
Filing dateOct 25, 2018
Priority dateApr 27, 2016
Publication dateJan 26, 2021
Grant dateJan 26, 2021

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Example memory reclaiming methods and apparatuses are provided to resolve a problem that application data is lost and a restart speed of an application becomes slower in a manner of reclaiming a memory by killing the application. One example memory reclaiming method includes determining an application program that occupies a to-be-reclaimed memory and selecting at least one virtual address space segment according to a running state of the application program. A virtual address space that is in the selected at least one virtual address space segment and that is occupied by the application program is reclaimed. The application program is not directly killed, but instead, only a memory occupied by application data that can be cleared in the running state is reclaimed according to the running state of the application program. Therefore, less application data is lost.

First claim

Opening claim text (preview).

What is claimed is: 1. A memory reclaiming method, wherein the method comprises: determining an application program that occupies a to-be-reclaimed memory from a plurality of application programs running on a terminal, according to a running state of each application program on the terminal, wherein the running state of each application program on the terminal describes a current execution state of each application program on the terminal; selecting, according to the running state of the application program, at least one virtual address space segment from multiple virtual address space segments occupied by the application program; and reclaiming virtual address space that is in the selected at least one virtual address space segment and that is occupied by the application program, wherein reclaiming the virtual address space includes: releasing the virtual address space occupied by the application program; cancelling a mapping relationship between the virtual address space occupied by the application program and corresponding physical address space; and clearing application data stored in the physical address space. 2. The method according to claim 1 , wherein the method further comprises: selecting one virtual address space segment from preset multiple virtual address space segments according to a first data type of application data to which a memory is to be allocated; and allocating virtual address space that is in the selected virtual address space segment to the application data, wherein the first data type of the application data is corresponding to a preset access frequency range. 3. The method according to claim 2 , wherein a type of the application data to which the memory is to be allocated further comprises a second data type, and wherein an access frequency range of the second data type is different from the access frequency range of the first data type. 4. The method according to claim 2 , wherein the first data type of the application data is determined according to the following steps: determining, according to monitored frequency on which the application data is accessed in the memory and preset multiple access frequency ranges, the access frequency range corresponding to the application data; and determining the first data type of the application data according to the access frequency range corresponding to the application data. 5. The method according to claim 1 , wherein the selecting, according to a running state of the application program, at least one virtual address space segment from multiple virtual address space segments occupied by the application program comprises: selecting the at least one virtual address space segment according to reclaiming priorities separately corresponding to virtual address space segments that can be reclaimed in the running state. 6. The method according to claim 1 , wherein the running state of each application program on the terminal is one of a plurality of running states comprising a foreground state, a visible state, a perceptible state, a background state, a cache state, and an idle process state. 7. A memory reclaiming apparatus, wherein the apparatus comprises: at least one processor; and a non-transitory computer-readable storage medium coupled to the at least one processor and storing programming instructions for execution by the at least one processor, the programming instructions instruct the at least one processor to: determine an application program that occupies a to-be-reclaimed memory from a plurality of application programs running on a terminal, according to a running state of each application program on the terminal, wherein the running state of each application program on the terminal describes a current execution state of each application program on the terminal; select, according to the running state of the determined application program, at least one virtual address space segment from multiple virtual address space segments occupied by the application program; and reclaim virtual address space that is in the at least one virtual address space segment selected and that is occupied by the application program, wherein reclaiming the virtual address space includes: releasing the virtual address space occupied by the application program; cancelling a mapping relationship between the virtual address space occupied by the application program and corresponding physical address space; and clearing application data stored in the physical address space. 8. The apparatus according to claim 7 , wherein the programming instructions instruct the at least one processor to: select one virtual address space segment from preset multiple virtual address space segments according to a first data type of application data to which a memory is to be allocated; and allocate virtual address space that is in the selected virtual address space segment to the application data, wherein the first data type of the application data is corresponding to a preset access frequency range. 9. The apparatus according to claim 8 wherein a type of the application data to which the memory is to be allocated further comprises a second data type, and wherein an access frequency range of the second data type is different from the access frequency range of the first data type. 10. The apparatus according to claim 8 , wherein the programming instructions instruct the at least one processor to determine the first data type of the application data according to the following steps: determining, according to monitored frequency on which the application data is accessed in the memory and preset multiple access frequency ranges, the access frequency range corresponding to the application data; and determining the first data type of the application data according to the access frequency range corresponding to the application data. 11. The apparatus according to claim 7 , wherein the programming instructions instruct the at least one processor to: select the at least one virtual address space segment according to reclaiming priorities separately corresponding to virtual address space segments that can be reclaimed in the running state. 12. A terminal, comprising at least one processor, a computer-readable storage, and a communications bus, wherein the communications bus is configured to implement connection and communication between the at least one processor and the computer-readable storage, and the at least one processor is configured to execute the following instructions stored in the computer-readable storage: determining an application program that occupies a to-be-reclaimed memory from a plurality of application programs running on the terminal, according to a running state of each application program on the terminal, wherein the running state of each application program on the terminal describes a current execution state of each application program on the terminal; selecting, according to the running state of the application program, at least one virtual address space segment from multiple virtual address space segments occupied by the application program; and reclaiming virtual address space that is in the selected at least one virtual address space segment and that is occupied by the application program, wherein reclaiming the virtual address space includes: releasing the virtual address space occupied by the application program; cancelling a mapping relationship between the virtual address space occupied by the application program and corresponding physical address space; and clearing application data stored in the physical address space. 13. The terminal according to claim 12 , the at

Assignees

Inventors

Classifications

  • G06F12/08Primary

    in hierarchically structured memory systems, e.g. virtual memory systems · CPC title

  • of the least frequently used [LFU] type, e.g. with individual count value · CPC title

  • Portable consumer electronics, e.g. mobile phone · CPC title

  • Mechanisms to release resources · CPC title

  • Monitor · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10901890B2 cover?
Example memory reclaiming methods and apparatuses are provided to resolve a problem that application data is lost and a restart speed of an application becomes slower in a manner of reclaiming a memory by killing the application. One example memory reclaiming method includes determining an application program that occupies a to-be-reclaimed memory and selecting at least one virtual address spac…
Who is the assignee on this patent?
Huawei Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F12/08. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jan 26 2021 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 2 related publications on this page (citations in our corpus or others sharing the same primary CPC).