发明名称 Method, apparatus and terminal for releasing memory
摘要 A method is provided for memory releasing. The method includes obtaining a first memory space value of a terminal system, where the first memory space represents a size of current idle memory space on the terminal system. The method also includes requesting a memory space whose size equals to a second memory space value from the terminal system, where the second memory space value is greater than the first memory space value. Further, the method includes releasing occupied memory after the terminal system receives a memory space request and detects that the second memory space value is greater than the first memory space value. The method includes confirming allocation of the memory space whose size equals to the second memory space value. The method includes releasing the memory space whose size equals to the second memory space value as the idle memory space after receiving allocation confirmation of the memory space of the terminal system.
申请公布号 US9639399(B2) 申请公布日期 2017.05.02
申请号 US201414246222 申请日期 2014.04.07
申请人 TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED 发明人 Chen Zebin;Ding Haifeng
分类号 G06F9/50;G06F12/02 主分类号 G06F9/50
代理机构 Anova Law Group, PLLC 代理人 Anova Law Group, PLLC
主权项 1. A method for releasing memory, comprising: obtaining, by an application program without requesting permissions from a system kernel level API (Application Programming Interface) controlling memory releasing in a terminal system, a first memory space value of the terminal system, wherein the first memory space value represents a total size of current idle memory space on the terminal system, and the application program is a user-installed non-system program; requesting, by the application program, a memory space whose size equals to a second memory space value from the terminal system, wherein the second memory space value is greater than the first memory space value; after receiving the memory space request and detecting that the second memory space value is greater than the first memory space value, releasing, by the terminal system, certain occupied memory; confirming, by the terminal system, allocation of the memory space whose size equals to the second memory space value; receiving, by the application program, the allocation of the memory space directed to the application program from the terminal system, wherein a size of the allocation equals to the second memory space; and after receiving allocation confirmation of the memory space of the terminal system, releasing, by the application program, the memory space whose size equals to the second memory space value allocated for the application program into the current idle memory space, wherein before requesting the memory space whose size equals to the second memory space value from the terminal system, the method further comprises: identifying system programs and non-system programs, wherein system programs are kernel level programs that control an operation of the terminal system, and non-system programs are user-installed programs that do not control system operations; obtaining a third memory space value, wherein the third memory space value represents a memory space that is occupied by non-system programs and unused for a preset time period; and obtaining the second memory space value by multiplying a sum of the first memory space value and the third memory space value by a preset ratio, wherein the preset ratio is determined according to the first memory space and the third memory space, to produce a multiplication result greater than the first memory space value.
地址 Shenzhen CN