# US 2026/0037356 A1 · Memory management method and module, chip, electronic device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0037356 A1
- Document ID: US20260037356A1
- Status: Published application
- Kind: A1
- Application number: 18/995,732
- Filed: 2022-08-30
- Published: 2026-02-05
- Earliest claimed: 2022-08-30
- Assignees: Amlogic (Shanghai) Co., Ltd.
- Applicants: Amlogic (Shanghai) Co., Ltd.
- Inventors: Tao Zeng; Jianxin Pan
- Web page: https://patentgrep.com/patent/US20260037356A1

## CPC

- G06F 11/0772: {Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers}
- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- G06F 9/455: Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F 11/073: {in a memory management context, e.g. virtual memory or cache management (memory management G06F12/00; testing of static memory units G11C29/00)}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 2212/401: Compressed data
- G06F 2212/657: Virtual address space management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory management method and module, a chip, an electronic device, and a storage medium. The memory management method comprises: scanning memory pages to which virtual addresses of a discontinuous memory mapping space are mapped to acquire a compressible memory page as a first memory page; compressing memory data in the first memory page to acquire corresponding memory compressed data; storing the memory compressed data in a data storage module, the data storage module being located in memory space outside the discontinuous memory mapping space; after storing the memory compressed data in the data storage module, releasing the first memory page; and setting the corresponding virtual address as a page fault address. The memory utilization is improved.

## Claims

### Claim 1

A memory management method, comprising:
scanning a memory page to which a virtual address of a discontinuous memory mapping space is mapped, so as to obtain a compressible memory page as a first memory page;
compressing memory data in the first memory page, so as to obtain corresponding memory compressed data;
storing the memory compressed data in a data storage module preset, wherein the data storage module is located in memory space outside the discontinuous memory mapping space;
releasing the first memory page after the memory compressed data are stored in the data storage module; and
setting the corresponding virtual address as a page fault address.

### Claim 2 (depends on 1)

The memory management method according to claim 1, wherein the scanning a memory page to which a virtual address of a discontinuous memory mapping space is mapped, so as to obtain a compressible memory page as a first memory page comprises:
acquiring a virtual address interval of current scanning from a current scanning cycle according to an ultimate virtual address of previous scanning;
traversing the virtual address interval of current scanning, so as to obtain a traversed current virtual address;
acquiring a corresponding memory page table entry from a memory page table according to the traversed current virtual address, wherein the memory page table entry comprises a mapping relationship between the virtual address and a memory page;
acquiring the corresponding memory page according to the memory page table entry acquired;
taking the memory page acquired as the first memory page in a case that the corresponding memory page is acquired and the memory page acquired has a compressibility identifier;
acquiring a next virtual address as a current virtual address, and not re-executing steps from the step of acquiring a corresponding memory page table entry according to the traversed current virtual address until all virtual address intervals of current scanning are traversed; and
recording an ultimate virtual address of current scanning, and not ending current scanning until a next scanning cycle is reached.

### Claim 3 (depends on 2)

The memory management method according to claim 2, wherein the acquiring a virtual address interval of current scanning according to an ultimate virtual address of previous scanning comprises:
acquiring the ultimate virtual address of previous scanning;
acquiring a data structure instance of a virtual mapping area corresponding to current scanning according to the ultimate virtual address of previous scanning;
acquiring an initial virtual address of current scanning and information of a size of the virtual address interval from the data structure instance of the virtual mapping area corresponding to current scanning;
calculating the ultimate virtual address of current scanning according to the initial virtual address of current scanning and the information of the size of the virtual address interval that are acquired; and forming the virtual address interval of current scanning from the initial virtual address of current scanning to the ultimate virtual address of current scanning.

### Claim 4 (depends on 1)

The memory management method according to claim 1, wherein the storing the memory compressed data in a data storage module comprises:
allocating a corresponding data storage position to the memory compressed data in the data storage module in a case that compression of the memory compressed data succeeds and a compression ratio satisfies a preset demand; and
storing the memory compressed data in the data storage position allocated in the data storage module.

### Claim 5 (depends on 1)

The memory management method according to claim 1, wherein after the corresponding virtual address is set as the page fault address, the method further comprises:
executing page fault exception processing in a case that the page fault address is accessed.

### Claim 6 (depends on 5)

The memory management method according to claim 5, wherein the executing page fault exception processing comprises:
acquiring an idle memory page as a second memory page;
acquiring the corresponding memory compressed data from the data storage module according to the page fault address;
decompressing the memory compressed data acquired into the second memory page; and
performing mapping processing on the second memory page and the page fault address, so that the page fault address is mapped to the second memory page.

### Claim 7 (depends on 6)

The memory management method according to claim 6, wherein before page fault exception processing is executed, the method further comprises: pre-applying for the idle memory page; and storing information of the idle memory page applied for; and
the acquiring an idle memory page as a second memory page comprises: acquiring the idle memory page applied for as the second memory page according to the stored information of the idle memory page.

### Claim 8 (depends on 7)

The memory management method according to claim 7, wherein after the information of the idle memory page applied for is stored, the method further comprises:
performing locking processing on the idle memory page applied for, so that the idle memory page applied for is locked; and
before the memory compressed data acquired are decompressed into the second memory page, the method further comprises: performing unlocking processing on the idle memory page applied for, so that a lock of the idle memory page applied for is removed.

### Claim 9 (depends on 6)

The memory management method according to claim 6, wherein after the memory compressed data are stored in the data storage module, the method further comprises: generating a corresponding page mapping data structure instance for the memory compressed data, wherein the page mapping data structure instance comprises the page fault address and information of the data storage position of the memory compressed data in the data storage module; and inserting the page mapping data structure instance generated into a management red-black tree with the page fault address as a key value; and
the acquiring the corresponding memory compressed data from the data storage module according to the page fault address comprises: acquiring the corresponding page mapping data structure instance from the management red-black tree according to the page fault address;
acquiring the information of the data storage position of the memory compressed data in the data storage module from the page mapping data structure instance acquired in a case that the corresponding page mapping data structure instance is acquired; acquiring the memory compressed data from the data storage position acquired; and releasing the corresponding page mapping data structure instance after the memory compressed data are acquired from the data storage position acquired.

### Claim 10 (depends on 1)

The memory management method according to claim 1, wherein the data storage module is a zero-capacitor random access memory (ZRAM) module.

### Claim 11

(canceled)

### Claim 12

(canceled)

### Claim 13

An electronic device, comprising:
at least one memory and at least one processor, wherein the memory stores one or more computer instructions that, when executed by the processor, cause the processor to implement a memory management method, the method comprising:
scanning a memory page to which a virtual address of a discontinuous memory mapping space is mapped, so as to obtain a compressible memory page as a first memory page;
compressing memory data in the first memory page, so as to obtain corresponding memory compressed data;
storing the memory compressed data in a data storage module preset, wherein the data storage module is located in memory space outside the discontinuous memory mapping space;
releasing the first memory page after the memory compressed data are stored in the data storage module; and
setting the corresponding virtual address as a page fault address.

### Claim 14

(canceled)

### Claim 15 (depends on 13)

The electronic device according to claim 13, wherein the scanning a memory page to which a virtual address of a discontinuous memory mapping space is mapped, so as to obtain a compressible memory page as a first memory page comprises:
acquiring a virtual address interval of current scanning from a current scanning cycle according to an ultimate virtual address of previous scanning;
traversing the virtual address interval of current scanning, so as to obtain a traversed current virtual address;
acquiring a corresponding memory page table entry from a memory page table according to the traversed current virtual address, wherein the memory page table entry comprises a mapping relationship between the virtual address and a memory page;
acquiring the corresponding memory page according to the memory page table entry acquired;
taking the memory page acquired as the first memory page in a case that the corresponding memory page is acquired and the memory page acquired has a compressibility identifier;
acquiring a next virtual address as a current virtual address, and not re-executing steps from the step of acquiring a corresponding memory page table entry according to the traversed current virtual address until all virtual address intervals of current scanning are traversed; and
recording an ultimate virtual address of current scanning, and not ending current scanning until a next scanning cycle is reached.

### Claim 16 (depends on 15)

The electronic device according to claim 15, wherein the acquiring a virtual address interval of current scanning according to an ultimate virtual address of previous scanning comprises:
acquiring the ultimate virtual address of previous scanning;
acquiring a data structure instance of a virtual mapping area corresponding to current scanning according to the ultimate virtual address of previous scanning;
acquiring an initial virtual address of current scanning and information of a size of the virtual address interval from the data structure instance of the virtual mapping area corresponding to current scanning;
calculating the ultimate virtual address of current scanning according to the initial virtual address of current scanning and the information of the size of the virtual address interval that are acquired; and forming the virtual address interval of current scanning from the initial virtual address of current scanning to the ultimate virtual address of current scanning.

### Claim 17 (depends on 13)

The electronic device according to claim 13, wherein the storing the memory compressed data in a data storage module comprises:
allocating a corresponding data storage position to the memory compressed data in the data storage module in a case that compression of the memory compressed data succeeds and a compression ratio satisfies a preset demand; and
storing the memory compressed data in the data storage position allocated in the data storage module.

### Claim 18 (depends on 13)

The electronic device according to claim 13, wherein after the corresponding virtual address is set as the page fault address, the method further comprises:
executing page fault exception processing in a case that the page fault address is accessed.

### Claim 19

A non-transitory storage medium storing one or more computer instructions that, when executed by at least one processor, cause the at least one processor to implement a memory management method, the method comprising:
scanning a memory page to which a virtual address of a discontinuous memory mapping space is mapped, so as to obtain a compressible memory page as a first memory page;
compressing memory data in the first memory page, so as to obtain corresponding memory compressed data;
storing the memory compressed data in a data storage module preset, wherein the data storage module is located in memory space outside the discontinuous memory mapping space;
releasing the first memory page after the memory compressed data are stored in the data storage module; and
setting the corresponding virtual address as a page fault address.

### Claim 20 (depends on 19)

The non-transitory storage medium according to claim 19, wherein the scanning a memory page to which a virtual address of a discontinuous memory mapping space is mapped, so as to obtain a compressible memory page as a first memory page comprises:
acquiring a virtual address interval of current scanning from a current scanning cycle according to an ultimate virtual address of previous scanning;
traversing the virtual address interval of current scanning, so as to obtain a traversed current virtual address;
acquiring a corresponding memory page table entry from a memory page table according to the traversed current virtual address, wherein the memory page table entry comprises a mapping relationship between the virtual address and a memory page;
acquiring the corresponding memory page according to the memory page table entry acquired;
taking the memory page acquired as the first memory page in a case that the corresponding memory page is acquired and the memory page acquired has a compressibility identifier;
acquiring a next virtual address as a current virtual address, and not re-executing steps from the step of acquiring a corresponding memory page table entry according to the traversed current virtual address until all virtual address intervals of current scanning are traversed; and
recording an ultimate virtual address of current scanning, and not ending current scanning until a next scanning cycle is reached.

### Claim 21 (depends on 20)

The non-transitory storage medium according to claim 20, wherein the acquiring a virtual address interval of current scanning according to an ultimate virtual address of previous scanning comprises:
acquiring the ultimate virtual address of previous scanning;
acquiring a data structure instance of a virtual mapping area corresponding to current scanning according to the ultimate virtual address of previous scanning;
acquiring an initial virtual address of current scanning and information of a size of the virtual address interval from the data structure instance of the virtual mapping area corresponding to current scanning;
calculating the ultimate virtual address of current scanning according to the initial virtual address of current scanning and the information of the size of the virtual address interval that are acquired; and forming the virtual address interval of current scanning from the initial virtual address of current scanning to the ultimate virtual address of current scanning.

### Claim 22 (depends on 19)

The non-transitory storage medium according to claim 19, wherein the storing the memory compressed data in a data storage module comprises:
allocating a corresponding data storage position to the memory compressed data in the data storage module in a case that compression of the memory compressed data succeeds and a compression ratio satisfies a preset demand; and
storing the memory compressed data in the data storage position allocated in the data storage module.

### Claim 23 (depends on 19)

The non-transitory storage medium according to claim 19, wherein after the corresponding virtual address is set as the page fault address, the method further comprises:
executing page fault exception processing in a case that the page fault address is accessed.
