The garbage collector is a special feature that distinguishes Java from other programming languages. It frees programmers from the heavy work of manually reclaiming memory space. In the Java Programmer certification exams of SUN, the garbage collector is mandatory and generally accounts for about 6% of the total score. But because SUN's Java Programming Language SL-275 curriculum standard textbooks, the con
stack.
-xx:survivorratio=4: Sets the ratio of the size of Eden and survivor in the younger generation. Set to 4, the ratio of two survivor to one Eden area is 2:4, and a survivor area represents 1/6 of the entire young generation.
-xx:maxpermsize=16m: Set the persistent generation size to 16m.
-xx:maxtenuringthreshold=0: sets the maximum age for garbage. If set to 0, then the young generation object does not go through the survivor area, directly into the old generation. For older g
GC Algorithm Garbage Collector overviewGarbage collection Garbage Collection is often referred to as the "GC", which was born in the 1960 MIT Lisp language, and has matured for more than half a century.In the JVM, the program counter, virtual machine stack, and local method stack are all born with threads, and stack frames are loaded and out of the stack with the entry and exit of the method, and automatic memory cleanup is realized, so our memory gar
1. PrefaceGarbage collector is the previous chapter of the garbage collection algorithm theoretical knowledge of the specific implementation of the different virtual machines provided by the garbage collector may be a great difference, and we must explain in advance that there is no best garbage collector, more than a universal
efficiency is very high.
According to the characteristics of the Cenozoic, there are few objects that still exist, but what to do if a survivor space cannot provide enough space for the surviving object to be stored. The answer is to go to the old age to rent a little memory for emergency
In some extreme cases, the target survival rate may be 100%, when more memory needs to be requested from the old age
One, serial collector
Cenozoic collectors, usi
Master three garbage algorithms, seven garbage collectors, and learn what garbage collection algorithms are used for each garbage collector, as well as knowledge points about SafePoint.garbage Collection Algorithm1. Tag-purge algorithm (mark-sweep)tags (such as the accessibility algorithm) are all objects that need to be recycled, and all tagged objects are reclaimed after the tag is marked.Disadvantage: The labeling and purging process is inefficient
The garbage collector is a specific implementation of memory recycling, the Java virtual machine specification does not specify its implementation, different vendors, different versions of the virtual machine provides a large variety of garbage collectors. This article mainly introduces the garbage collector in the HotSpot virtual machine.Various garbage collectorsShows different garbage collectors, each of
This article is based on Zhou Zhiming's "in-depth understanding of Java virtual machines"If the collection algorithm is the method of memory recycling, the garbage collector is the specific implementation of memory recycling. There is no provision for how the garbage collector should be implemented in the Java Virtual Machine specification, so different vendors, different versions of the virtual machines, m
Read the Java Paper garbage collector type article, here to do a summary, the article part of the translation from the Java Paper GC collector, part of the summary of their own, the image from the network, which is only used to understand the expression.One, JVM GC garbage collector typeThe JVM's garbage collector is b
If the collection algorithm is the method of memory recycling, then the garbage collector is the specific implementation of memory recycling. In the Java Virtual Machine specification, how the object garbage collector should be implemented does not have any rules, so different vendors, different versions of the virtual machines provided by the collector may be qu
Introduction
Garbage collection technology is not the Java language Initiative, the 1960 was born at MIT Lisp is the first real use of memory dynamic allocation and garbage collection technology language. Three issues to consider for garbage collection technology are:
1. Which memory needs to be recycled
2. When to recycle
3. How to Recycle
The distribution of Java Memory Runtime regions, where program counters, virtual machine stacks, and local method areas are all born with threads, and a
New generation collectors for hotspot virtual machines
There are seven main types of hotspot garbage collectors: As shown in the picture:The upper part of the figure is the new generation of garbage collectors, the following section represents the old age of the garbage collector, the two garbage collector between the line means that two collectors with the use. Serial
http://blog.csdn.net/java2000_wl/article/details/8030172 Click on the Open link
HotSpot JVM Collector
There are 7 collectors, divided into two, the new generation of collectors, the following is the old age collector. If there is a connection between the two collectors, it means they can be used in combination.serial (serial GC) collectorThe serial collector is
, the garbage collector will never reclaim
Objectobj = new Object ();
The corresponding object such as Obj.equels (NewObject ()) can be obtained directly through the objective lens.
And so the Obj object is a strong reference to the subsequent newobject, and only if the obj reference is released, the object will be released, which is also the encoding form we often use.
2, soft reference
Must be referenced and reclaimed before memory overflows, and ca
with the thread, and out of the thread, so that the memory allocation and recovery of these areas are deterministic, there is no need to too much consideration of the recycling problem, because the end of the method or the end of the thread, memory naturally with the recycling. The Java heap and method areas are different and different! (How not to say the catchy), this part of the memory allocation and recycling is dynamic, it is the garbage collector
Serial collector: (Serial collector)
This collector is a single-threaded collector, but its single-threaded meaning does not just mean that it uses only one CPU or a collection thread to do the garbage collection, but more importantly, when it does garbage collection, All of the other worker threads must be paused (Sto
Java 8 series Stream powerful tool Collector, streamcollector
Stream series:
The basic syntax of Stream in Java 8 series
Java 8 series Stream powerful tool Collector
Reconstruction and customization of Java 8 series collectors
Universal reduce in Stream of Java 8 series
Overview
Previously we used collect (toList () to generate a list in the stream. In the actual development process, List is the data
Garbage collector:The main implementation of Java's garbage collection mechanism is the "garbage collector", but the garbage collector provided by each vendor's virtual machine is very different, and even the same virtual machine provides several separate garbage collectors for users to combine according to their different characteristics. Is the collector that t
"declaration"Welcome reprint, but please keep the original source of the article →_→Life One number: http://www.cnblogs.com/smyhvae/Article Source: http://www.cnblogs.com/smyhvae/p/4748313.htmlContact information: [Email protected]The main content of this article:
Review of the Heap
Serial collector
Parallel collector
CMS collector
0, He
Garbage collector
Garbage collector for hotspot virtual machines
There is no provision in the Java Virtual Machine specification for how the garbage collector can be implemented, so different versions of the virtual machine provide a large difference in the garbage collector, and will provide the paramet
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service