Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Memory allocation and garbage collection method based on life-period prediction

A technology of memory allocation and garbage collection, applied in the direction of memory address/allocation/relocation, etc., to reduce the number of pauses, reduce execution time, and avoid copy operations.

Inactive Publication Date: 2014-09-10
JIANGNAN UNIV
View PDF4 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Garbage collection is a research focus, and there is currently no way to perfectly solve the garbage problem

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 allocation and garbage collection method based on life-period prediction
  • Memory allocation and garbage collection method based on life-period prediction
  • Memory allocation and garbage collection method based on life-period prediction

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] In order to realize the purpose of the invention and make the technical scheme and characteristics clearer, the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments:

[0020] attached figure 1 It is the memory allocation flowchart of the present invention.

[0021] Memory allocation uses a lifetime prediction mechanism to determine the allocation area. When the program applies for memory for each object, it first judges whether the class to which the object belongs is a longevity class. The criteria for judging the longevity class are as follows:

[0022] For a class C, its survival rate in the i-th garbage collection process is defined as the object survival rate r of class C in this garbage collection process i c .

[0023] r i c = m i c a ...

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 allocation and garbage collection method based on life-period prediction. The method comprises the following steps that objects with long life-periods are directly allocated to an older area by predicting life-period lengths of the objects to be allocated, and the copied number from a young area to the older area is reduced to lower the execution time of garbage collection; in the young area, the young area is further effectively divided to achieve a non-pause mode of simultaneously allocating the objects and collecting garbage so as to reduce the pause times in a procedure operation process; a lazy-buddy mode is adopted in the older area to carry out memory allocation, so that the memory allocation speed is ensured, and a Mark-sweep method is combined to collect the garbage, so that copy operations of large objects is avoided, and the number of memory fragments is controlled.

Description

technical field [0001] The invention relates to an automatic memory management method, in particular to a memory allocation and garbage collection method based on lifetime prediction. The method can be used in development environments with limited memory resources, such as embedded virtual machine platforms and language compilation environments. Background technique [0002] In modern programming languages, such as java and C#, if the program allocates memory for an object, when an object is no longer referenced by other objects, the object becomes a "garbage" object, and the memory occupied by the "garbage" object if If it is not released in time, the system memory will be gradually eaten up, causing the application system to crash. [0003] To solve the above problems, the system needs to provide a garbage collection mechanism. The precise definition of garbage collection is the automatic management mechanism of dynamically allocated memory. The garbage collector will a...

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): G06F12/02
Inventor 白瑞林张涛
Owner JIANGNAN UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products