Memory management method, electronic device, and storage medium
AssigneeHonor Device Co., Ltd.
InventorsXin Wang, Kunli Lin, Xiaobin Tian, Xiaolong Zhou
Life of this patent
Estimating the term…
Abstract
This application relates to a memory management method. The method includes: writing the memory management method in a form of software code onto a kernel layer, and separating the software code from kernel code. A kernel may call the software code by using a call function to manage memory space. For example, an anonymous page corresponding to an application is compressed into block space, and a compression page corresponding to the application is dumped into a universal flash storage.
Claims20
A memory management method, applied to an electronic device, wherein the electronic device comprises a kernel layer, the kernel layer comprises a memory management engine and a kernel, and the method comprises:
- calling, by the kernel, a memory control group cluster in the memory management engine if a first storage of the electronic device satisfies a first preset condition, to compress data in a part of anonymous pages of the first storage and store the compressed data into first storage space in the first storage;
- and
- calling, by the kernel, the memory control group cluster in the memory management engine if the first storage of the electronic device satisfies a second preset condition, to store a part or all of the compressed data in the first storage space into a second storage.
An electronic device, comprising:
- a memory, a processor, and instructions that is stored in the memory and that is capable of running on the processor, wherein when the processor executes the instructions, the electronic device is enabled to perform:
- calling, by a kernel, a memory control group cluster in a memory management engine if a first storage of the electronic device satisfies a first preset condition, to compress data in a part of anonymous pages of the first storage and store the compressed data into first storage space in the first storage;
- and
- calling, by the kernel, the memory control group cluster in the memory management engine if the first storage of the electronic device satisfies a second preset condition, to store a part or all of the compressed data in the first storage space into a second storage.
A non-transitory machine-readable storage medium, storing instructions, wherein the instructions, when executed on an electronic device, enable the electronic device to perform:
- calling, by a kernel, a memory control group cluster in a memory management engine if a first storage of the electronic device satisfies a first preset condition, to compress data in a part of anonymous pages of the first storage and store the compressed data into first storage space in the first storage;
- and
- calling, by the kernel, the memory control group cluster in the memory management engine if the first storage of the electronic device satisfies a second preset condition, to store a part or all of the compressed data in the first storage space into a second storage.
Dependencies are inferred from the claim text.