Python code memory leak detection method based on mode

A memory leak and detection method technology, applied in the field of pattern-based Python code memory leak detection, can solve the problems of high cost and achieve high accuracy and fast speed
CN113407442AActive Publication Date: 2021-09-17HANGZHOU DIANZI UNIV

Patent Information

Authority / Receiving Office
CN Β· China
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Publication Date
2021-09-17

Smart Images

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

Abstract

The invention discloses a Python code memory leak detection method based on a mode. According to the method, type information of Python codes is obtained by means of type inference, memory leak detection is carried out in combination with a self-defined mode, and circular reference causing memory leak is obtained. The detection method has the advantages of being high in precision, high in speed and the like, memory leakage existing in the code can be effectively detected before the code runs, and relevant developers are timely notified to adopt corresponding solutions. The Python code memory leak detection method based on the mode, provided by the invention, is different from the characteristic that a conventional detection method only analyzes the use condition of a memory during code operation, is suitable for detection of a coding stage in a software development process, and is beneficial to discovering defect codes as early as possible.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the technical field of software, in particular to a pattern-based Python code memory leak detection method. Background technique

[0002] Memory leak is a common error in software engineering, that is, after the program dynamically applies for memory, it does not release the memory before it ends, resulting in long-term occupation of memory resources. Early in a project, memory leaks often don't have any noticeable symptoms. The occurrence of memory leaks is a continuous process. As they accumulate in the system, the number of leaked objects will continue to increase, resulting in a continuous decrease in memory resources in the system. When the memory resources in the system are exhausted, the application programs in the system will temporarily suspend, waiting for the reallocation of memory. If the memory reallocation process takes a long time, it will crash the system.

[0003] In recent years, programming languages ​​hav...

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