Supercharge Your Innovation With Domain-Expert AI Agents!

Method for immediately recording object allocation points when Java object memory leak is monitored on Android system

An Android system and memory leak technology, applied in the computer field, can solve problems such as monitoring memory leaks, and achieve good results

Active Publication Date: 2020-12-18
BEIHANG UNIV
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Aiming at the problem that the existing monitoring tools cannot meet the needs of users to monitor memory leaks in all scenarios, the present invention proposes a method for instantly recording object allocation points when monitoring Java object memory leaks on an Android system, using a lightweight The monitoring mechanism is used to judge the "hot and cold" status of objects in ART. By monitoring the activity behavior of objects during runtime, online maintenance and judgment of implicit memory leaks of objects can be found, so as to find the allocation point of "cold" objects

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
  • Method for immediately recording object allocation points when Java object memory leak is monitored on Android system
  • Method for immediately recording object allocation points when Java object memory leak is monitored on Android system
  • Method for immediately recording object allocation points when Java object memory leak is monitored on Android system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] The present invention will be further described in detail with reference to the accompanying drawings and embodiments.

[0017] Based on the idea of ​​traditional bitmaps, the present invention compresses and clusters object allocation points, and provides an idea of ​​"coloring" allocation points. By sacrificing part of the information accuracy, when it is determined that an object is leaking, there is a probability that a set of allocation points including the allocation point of the object will be output, which achieves the effect of lower runtime load.

[0018] Such as figure 1 As shown, the method for instantly recording object allocation points when monitoring Java object memory leaks on the Android system implemented by the present invention is a lightweight monitoring mechanism. By improving the original garbage collection mechanism in the Android system, new objects Monitoring module, looking for "cold" objects to infer memory leaks, figure 1 The virtual box ...

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 method for instantly recording object allocation points when Java object memory leak is monitored on an Android system and belongs to the technical field of computers. The method is based on the idea of a traditional bitmap, object distribution points are compressed and clustered, each object on a Java heap is described with 8-bit data in the compressed bitmap, the first bit is used for identifying whether the objects are accessed or not, and the latter 7 bits are used for recording the colors of the distribution points of the objects; during monitoring, the main GC triggers leakage inference once every N times, and whether the object is a cold object or not is judged according to the compressed bitmap; when it is judged that a certain object leaks, the distribution points and the distribution functions of the same object type in the distribution points with the same color as the object distribution points are output. According to the method, an online lightweight leakage inference mechanism is realized, and distribution point information related to memory leakage can be provided; compared with the prior art, load performance is better during operation.

Description

technical field [0001] The invention belongs to the technical field of computers, and in particular relates to a monitoring method for instantly recording object allocation points when a Java object memory leaks on an Android system. Background technique [0002] In the JAVA virtual machine, the garbage collection mechanism is generally implemented by an algorithm based on reference counting or reachability analysis to recycle unreachable objects. The automatic garbage collection mechanism reduces the errors of improper use of program memory to a certain extent, and because it has a unified memory management mechanism, it improves the efficiency of application memory usage compared with manual allocation, and at the same time reduces the loss due to the automatic recovery mechanism. The problem of memory leak caused by object pointer. However, the automatic garbage collection mechanism cannot completely avoid memory leaks. JAVA objects often have a limited life cycle logica...

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): G06F11/30G06F9/455
CPCG06F11/3034G06F11/301G06F11/3051G06F9/45558G06F2009/45591
Inventor 史晓华张显龙
Owner BEIHANG UNIV
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More