Memory management method and system

A technology of memory management and memory, which is applied in the Internet field, can solve problems such as insufficient memory, and achieve the effect of alleviating the problem of insufficient memory and reducing the frequency of insufficient memory errors

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

AI Technical Summary

Problems solved by technology

[0008] In order to solve the above problems, the present invention provides a memory management method and system to solve the problem of insufficient memory when the memory allocator requests memory from the system

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 management method and system
  • Memory management method and system
  • Memory management method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0067] According to an embodiment of the present invention, an embodiment of a memory management method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and, although The logical sequence is shown in the flowchart, but in some cases, the steps shown or described may be performed in a different order than here.

[0068] The method embodiment provided in Embodiment 1 of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Take running on a computer terminal as an example, figure 2 It is a block diagram of the hardware structure of the computer terminal according to the memory management method of the embodiment of the present invention. Such as figure 2 As shown, the computer terminal 100 may include one or more (only one is shown in the figure) processor 102 (the processor 102 may in...

Embodiment 2

[0098] Such as Figure 5 As shown, the present invention provides another memory management method, including:

[0099] Step S501: Apply to the operating system for a memory of a specified size as reserved memory.

[0100] Step S502: Set a target coverage function.

[0101] Step S503: Intercept each memory allocator's request for memory from the operating system through the target coverage function, and send the intercepted request to the operating system.

[0102] Step S504: Monitor the response result of the operating system to the request through the target coverage function.

[0103] Step S505: Determine whether the memory application to the operating system is successful according to the response result. If the application for memory to the operating system fails, step S506 is executed, and if successful, step S508 is executed.

[0104] Step S506: Return the reserved memory to the operating system.

[0105] Step S507: Re-send a request for memory application to the operating system....

Embodiment 3

[0153] Such as Image 6 As shown, the present invention also provides a memory management system, including:

[0154] The reserved memory application module 601 is used to apply to the operating system for a specified size of memory as reserved memory;

[0155] The target coverage function setting module 602 is used to set the target coverage function;

[0156] The request interception module 603 is used to intercept requests for memory from each memory allocator to the operating system through the target coverage function, and send the intercepted requests to the operating system; the response monitoring module is used to monitor the operating system’s response to the operating system through the target coverage function The response result of the request;

[0157] The judging module 604 is used to judge whether the request for memory from the operating system is successful according to the response result;

[0158] The reserved memory returning module 605 is used to return the reserv...

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 discloses a memory management method and system, and belongs to the technical field of the internet. The memory management includes: applying a memory having a designated size as a reserved memory for an operation system; setting a target coverage function; intercepting and capturing requests that all the memory distributors apply memories for the operation system through the targetcoverage function, and sending the captured requests to the operation system; monitoring response results of the operation system to the requests through the target coverage function; determining if the memory applications for the operation system are successful or not according to the response results; returning the reserved memory to the operation system if not; and resending a memory application request to the operation system through the target coverage function. The method covers a process that all the memory distributors apply memories for the system, introduces the reserved memory so asto solve the problem of Out of Memory OOM due to the fact that memory applications of the memory distributors for the operation systems fail, and can lower the occurrence frequency of OOM to the greatest extent.

Description

Technical field [0001] The present invention relates to the field of Internet technology, in particular to a memory management method and system. Background technique [0002] Complex applications represented by browser applications are generally composed of multiple modules. These modules may adopt different memory management methods, use different memory allocators, and have no more understanding of each other, and lack of mutual application of memory to the system. Coordinated. This easily leads to the fragmentation of the virtual memory space of the process and the error of insufficient memory space, or OOM (OutOf Memory) error. [0003] The process of processing memory applications in the prior art is as follows figure 1 Shown: [0004] The first step: each memory allocator receives the request of the program to apply for memory; [0005] Step 2: Each memory allocator processes the memory request separately, and if the response fails, it sends a request for memory to the operat...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50
CPCG06F9/5016
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