Memory recovery method and device

A memory recycling and memory technology, applied in the computer field, can solve the problems of resource waste system performance, unreasonable memory recycling, and decline, and achieve the effect of overcoming resource waste, improving efficiency, and overcoming system performance decline.

CN103150259AInactive Publication Date: 2013-06-12HUAWEI TECH CO LTD
4 Cites 30 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2013-06-12
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a memory recovery method and a memory recovery device. The method comprises the following steps of: when memory recovery is required, determining an unprocessed partition of a memory node requiring memory recovery; acquiring a linked list with the highest recovery weight in the partition, performing memory recovery on the linked list and updating the recovery weight of the linked list; judging whether the recovery weight corresponding to the linked list with the highest recovery weight in the current partition is less than reference recovery weight to acquire a first judgment result; when the recovery weight is not less than the reference recovery weight, entering to acquire the linked list with the highest recovery weight in the partition, and performing the memory recovery on the linked list; and when the recovery weight is less than the reference recovery weight, entering one unprocessed partition of the memory node to be recovered until each partition of the memory node to be subjected to memory recovery is traversed. According to the method, the memory recovery efficiency is increased.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of computers, in particular to a memory recovery method and device. Background technique

[0002] In the operating system, in order to speed up the read and write operations on the disk, a large amount of data is cached in the memory. Before using the memory, the business process needs to apply for and start occupying the memory, and release the memory in time after using the memory. When the memory is occupied by a large amount and cannot be released, the operating system will run abnormally due to insufficient memory allocation.

[0003] In order to avoid system exceptions caused by insufficient memory allocation, the operating system introduces a memory allocation management and recycling mechanism. For example, in the Linux operating system, the memory control subsystem Memcg (Memory Control Group, memory control subsystem) controls the memory used by the process, such as limiting the memory usage of a...

Examples

Embodiment Construction

[0045] Embodiments of the present invention provide a memory recovery method and device, which can improve memory recovery efficiency and solve the problems of resource waste and system performance degradation caused by unreasonable memory recovery in the prior art.

[0046] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0047] see figure 1 , is a flow chart of the first embodiment of the...