Memory control method and device

A technology of memory control and memory, which is applied in the direction of program control design, multi-program device, memory address/allocation/relocation, etc. It can solve problems such as unbalanced, unable to reflect logical memory occupation, unable to meet the requirements of fine memory management, etc. , to effectively utilize hardware resources and improve user experience

Active Publication Date: 2018-05-25
深圳市雅阅科技有限公司
View PDF5 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, in the prior art, the cleaning event of the system memory is to clean up all applications in a unified manner, and the cleaning does not include the memory management operation for a certain application. Events are sent based on the overall physical memory status o

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Memory control method and device
  • Memory control method and device
  • Memory control method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] This embodiment provides a memory control method, such as figure 2 As shown, the method includes the following steps:

[0060] In step S100, the system initializes parameters. The initialization is mainly to set thresholds based on each stage of the target stage curve. The thresholds include aggressive growth thresholds, slow growth thresholds, and remaining memory thresholds.

[0061] The aggressive growth threshold and the gentle growth threshold are used to divide the aggressive growth stage and the gentle growth stage of the target stage curve. When the memory value occupied by the application is less than the aggressive growth threshold, the application is in the aggressive growth stage of the target stage curve. That is, when the application is in the foreground and the memory usage is below this threshold, it is the aggressive growth phase.

[0062] When the memory value of the application is greater than the aggressive growth threshold and smaller than the gen...

Embodiment 2

[0082] This embodiment provides an application memory control method, such as image 3 As shown, the method includes the following steps:

[0083] S201. Create a memory checker, where the memory checker runs on an independent thread.

[0084] S202. Receive a memory check request and trigger a memory check event.

[0085] S203, judging whether the application is running in the foreground, if yes, go to step S204, if not, go to step S205.

[0086] S204. Compare the size relationship between the amount of memory occupied by the application, the amount of remaining system memory, the amount of remaining virtual memory in the system, and the preset stage threshold, and perform memory control according to the comparison result; the preset stage threshold is established based on the application memory target stage curve .

[0087] S205. Perform memory recovery of corresponding intensity according to the system memory event level.

[0088] Before the step S201, a system initializati...

Embodiment 3

[0110] This embodiment provides a memory control device, such as Figure 6 As shown, the device includes the following modules:

[0111] A memory checker creation module for creating a memory checker, the memory checker running on an independent thread;

[0112] A memory check trigger module, configured to receive a memory check request and trigger a memory check event;

[0113] An application state judging module, configured to judge whether the application is running in the foreground;

[0114] The foreground memory control module is used to compare the relationship between the amount of memory occupied by the application, the amount of remaining system memory, the amount of remaining virtual memory in the system, and the preset stage threshold, and perform memory control according to the comparison result; the preset stage threshold is based on the application The memory target phase curve is established;

[0115] The background memory control module is used to reclaim m...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a memory control method and device. The method includes: creating a memory checker, wherein the memory checker is run in an independent thread; receiving a memory checking request, and triggering a memory checking event; judging whether an application is in a foreground running state, if yes, obtaining size relationships of an application memory-occupancy amount, a remainingsystem memory amount, a remaining system virtual-memory amount and preset phased threshold values by comparison, and carrying out memory control according to comparison results, wherein the preset phased threshold values are set on the basis of an application memory target-phase curve; and if not, carrying out corresponding-intensity memory recovery according to a system memory event level. According to the method, more elaborate memory management can be realized for the foreground application according to the application memory target-phase curve, contradiction of ceaseless system memory claiming of the application and the limited system memory total-amount can be solved on an application layer, hardware resources can be effectively utilized, and user experience can be improved at the same time.

Description

technical field [0001] The invention belongs to the technical field of intelligent equipment management, and in particular relates to a memory control method and device. Background technique [0002] As the basic resource for application running, memory affects user-perceivable indicators such as application performance, stability, and fluency. On the one hand, in order to achieve the perceivable indicators of user satisfaction, the application constantly asks the system for memory; on the other hand, the total amount of system memory is always limited, which constitutes a contradiction. In order to ensure the running of high-priority applications, the system always needs to kill some low-priority applications when the memory is insufficient to keep the available memory within the necessary range. Therefore, the memory needs to be controlled to prevent the application from being killed by the system, ensure the reasonable memory usage of the application itself, prevent the ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F12/02G06F9/50
CPCG06F9/5016G06F9/5022G06F12/0253
Inventor 刘海鹏
Owner 深圳市雅阅科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products