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

Method and device for garbage collection based on virtual machine

A recycling method and virtual machine technology, applied in the field of virtual machine-based garbage collection methods and devices, can solve problems such as limited storage space for allocating new objects, low application performance, and increased frequency of garbage collection, and achieve self-adaptive adjustment of the heap The effect of space size

Active Publication Date: 2020-03-13
LOONGSON TECH CORP
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, because most of the newly created objects will soon become inactive objects during the running of Java applications, so when garbage collection occurs, the number of active objects only accounts for a small part of the entire new objects. The storage space is the same size as the storage space for allocating new objects, so the heap storage space cannot be fully utilized, the storage space for allocating new objects is limited, the frequency of garbage collection increases, and the performance of the application is low

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 and device for garbage collection based on virtual machine
  • Method and device for garbage collection based on virtual machine
  • Method and device for garbage collection based on virtual machine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0022] Garbage collection is the core concept of memory management in JAVA programming. The memory management mechanism of JAVA virtual machine is called garbage collection mechanism, which is used to track objects in use and discover and recycle objects that are no longer used. This mechanism can effectively prevent two dangers that may occur in ...

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 embodiment of the invention provides a garbage recycling method and device based on a virtual machine. The method comprises the following steps that after it is determined that a first storage space is filled with novel objects created by an application program, all active objects in the first storage space and a second storage space at the current moment are stored into a third storage space; after it is determined that all the active objects are stored into the third storage space, clearing up the first storage space and the second storage space; according to the size, accounting for the storage space, of all the active objects, the size of the second storage space and the size of the third storage space are reset, and the second storage space and the third storage space are subjected to switch processing. According to the method, the pile space utilization rate can be increased, and the performance of the application program is improved.

Description

technical field [0001] Embodiments of the present invention relate to storage technologies, and in particular to a virtual machine-based garbage collection method and device. Background technique [0002] The memory management of Java programs is done by the Java virtual machine. During the execution of the application, if the application thread of the application cannot continue to allocate new objects in the Java heap, the Java virtual machine will trigger garbage collection to reclaim unused memory, so that the subsequent memory allocation process of new objects can proceed smoothly . [0003] The copy garbage collection algorithm is one of the garbage collection algorithms. Its implementation process is mainly as follows: the heap storage space is divided into two parts equally, the first part of the storage space is used for the current application thread to allocate new objects, and the second part of the storage space is reserved Storage space for saving active obje...

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): G06F9/50G06F9/455
CPCG06F9/45504G06F9/5077
Inventor 廖彬靳国杰高翔
Owner LOONGSON TECH CORP
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