Unlock instant, AI-driven research and patent intelligence for your innovation.

Applied memory management method and device

A technology of memory management and memory, which is applied in the field of communication, can solve problems such as insufficient application memory management, and achieve the effect of high coverage

Active Publication Date: 2017-08-04
TENCENT TECH (SHENZHEN) CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In order to solve the problem of insufficient management of application memory in the prior art, an embodiment of the present invention provides an application memory management method and device

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
  • Applied memory management method and device
  • Applied memory management method and device
  • Applied memory management method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] see figure 1 , an embodiment of the present invention provides an application memory management method, including:

[0045] 101: After receiving the application memory request from the application, query the memory application interface for operating memory paging;

[0046] 102: Allocate a memory block for the application according to the size of the memory page provided by the memory application interface for operating memory paging;

[0047] 103: Add a guard page at the beginning or end of the memory block allocated for the application, and the guard page is used to provide exception detection for the debugger.

[0048] In this embodiment, the allocation of a memory block for the application according to the size of the memory page provided by the memory application interface for operating memory paging includes:

[0049] Allocating a memory block for the application, and aligning the allocated memory block with the size of the memory page provided by the memory app...

Embodiment 2

[0062] The embodiment of the present invention provides a method for managing application memory. The method for managing application memory provided by the embodiment of the present invention is suitable for emulators. The method provided by the embodiment of the present invention can only be used on operating systems that support the memory paging mechanism. Such as Windows, Linux, Mac OS and other operating systems.

[0063] In the embodiment of the present invention, such as figure 2 As shown, the memory usage model of the Windows operating system is generally layered and includes: an application upper layer module, an application memory management device, and a C library encapsulating Malloc, HeapAlloc, and VirtualAlloc interfaces. Based on the system architecture of the Windows operating system, the application memory management module does not directly use the interface provided by the system (referring to the mobile phone platform / mobile phone emulator platform) memor...

Embodiment 3

[0077] see Figure 5 , the embodiment of the present invention provides an application memory management device, including: a takeover module 301, an allocation module 302 and an addition module 303.

[0078] The takeover module 301 is configured to query the memory application interface for operating memory paging after receiving the application memory request from the application;

[0079] An allocation module 302, configured to allocate a memory block for the application according to the size of the memory page provided by the memory application interface for operating the memory page;

[0080] The adding module 303 is configured to add a guard page at the beginning or end of the memory block allocated for the application, and the guard page is used to provide exception detection for the debugger.

[0081] Wherein, the allocation module 302 is specifically used for:

[0082] Allocating a memory block for the application, and aligning the allocated memory block with the si...

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 an application memory management method and device, belonging to the technical field of communication. The method includes: after receiving the application memory request from the application, querying the memory application interface for operating memory paging; according to the size of the memory page provided by the memory application interface for operating memory paging, allocating a memory block for the application; A guard page is added to a start position or an end position of the memory block allocated by the application, and the guard page is used to provide exception detection for the debugger. The present invention directly takes over the memory application interface of memory paging, allocates memory blocks for applications according to the size of memory paging, and adds a protection page to one end of the memory block, which can detect illegal reading and writing of memory, and at the same time, the detection coverage rate is higher high.

Description

technical field [0001] The present invention relates to the technical field of communication, in particular to an application memory management method and device. Background technique [0002] The development of native applications on low-end mobile phone platforms (mobile phone Java applications do not belong) generally uses C language or C++ language, and the memory management mechanism provided by the platform is relatively primitive, which requires application developers to have good quality, otherwise it is easy to cause memory loss. Leakage or illegal memory access can slow down the running speed of the application or the system, or even crash the system. [0003] In order to develop more stable native applications on these platforms, a current method of managing application memory is to take over the MMU (Memory Management Unit, memory management unit) at runtime. The way to take over the MMU at runtime is to build a memory management module by the application itself...

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 Patents(China)
IPC IPC(8): G06F11/00G06F12/02
Inventor 易壬俊
Owner TENCENT TECH (SHENZHEN) CO LTD