This LZ and you share the last two algorithms of GC, the replication algorithm and the tagging/finishing algorithm. As mentioned in the previous chapter on the marking/elimination algorithm, both of these algorithms evolve on this basis, and what are the two algorithms that optimize the previous tagging/removal algorithms?
Replication algorithm
Let's first take a look at the replication algorithm, the replication algorithm divides memory into two in
JVM Memory Composition Structure
The JVM stack consists of heaps, stacks, local method stacks, method areas, and so on, as shown in the following chart:
1) Heap
All the memory of objects created by new is allocated in the heap, and its size can be controlled by-XMX and-XMS. The heap is divided into the Cenozoic and th
First, we recall the root search algorithm mentioned in the previous chapter, which solves the problem of which objects we should recycle, but it obviously does not have the burden of garbage collection, because we want to do garbage collection while the program is running (the Java program that we run on the JVM). You must let the GC thread and the thread in the program to cooperate with each other in order to not affect the operation of the program
The Java Virtual machine memory management diagram looks like this:1. Thread sharing area, which is shared by all threads, has several components in the thread sharing area:1. Method area: Run the constant-time pool, the class information that has been loaded by the virtual machine, constants, static variables, the instant compiler compiled code and other data2.java Heap: Storage Object instance 2. Thread
3. For JVM memory configuration parameters:-xmx10240m-xms10240m-xmn5120m-xxsurvivorratio=3, its minimum memory value and survivor area total size are () 5120m,1024m 5120m,2048m 10 240m,1024m 10240m,2048m
Answer: D-XMX: Max Heap size-xms: Initial heap size-xmn: Young generation size-xxsurvivorratio: The ratio of the young to the survivor area in the middle of the
addresses of all surviving objects. In terms of efficiency, the tag/sorting algorithm is lower than the copy algorithm.
Algorithm Summary
1. All three algorithms are based on the root search algorithm to determine whether an object should be recycled. The theoretical basis for supporting root search algorithms to work normally is the scope of variables in the syntax. Therefore, the most fundamental way to prevent memory leakage is to master the v
This is the last GC-related article, the LZ is just a list of key parameters related to the garbage collector in the Hotspot JVM, as well as explanations of each parameter. Don't say much nonsense, this begins.
Garbage collector selection Parameters
USESERIALGC: Open this parameter using the serial serial old collector (client mode defaults).
USEPARNEWGC: Open this parameter using the Parnew serial old collector (not recommended).
USECONCMARKSWE
Why do we need to understand GC policies and principles?
The reason in the previous chapter has actually touched, is because in peacetime work and research, inevitably will encounter the memory overflow and the memory leaks the question. If you are not aware of the GC strategy and principles of the problem encountered before, many times it will be overwhelmed.
When we understand the relevant knowledge, al
JVM interpretation (III): JVM memory region, interpretation of jvm memory region
The full name of JVM is java Virtual Machine (java Virtual Machine). JVM shields software and hardware
Solve JVM memory overflow and jvm memory overflow
Today I encountered a problem. When I restarted Tomcat 6 when adding the configuration file (*. xml) content, the console reported the error: java. lang. StackOverflowError;
That is, stack overflow error.
Memory overflow o
Jvm runtime memory parsing and jvm runtime memory Parsing
I. jvm Concept
Before learning about the concept of jvm, let's first understand the logic structure of the java platform. The picture is from deep java virtual machine.
Talking about JVM and memory allocation, talking about JVM Memory Allocation
1. program memory allocation
Initial Memory Allocation
When a program is ready to run, it first needs memory
Java.lang.OutOfMemoryError:PermGen Space
Found that many people attribute the problem to: Spring,hibernate,tomcat, because they generate classes dynamically, causing permanent heap overflow in the JVM. Then there is a divergence of opinions about how to upgrade the Tomcat version to the latest or even simply without Tomcat. There are also questions about spring that are hotly discussed at the Spring Forum, because spring's use of cblib in AOP creates
Detailed description of JVM memory partition and garbage collection mechanism, jvm garbage collection
When writing Java code, you do not need to worry about whether your New object is released or when. Because the JVM has an automatic garbage collection mechanism. In our previous blog, we talked about the MRC (manual r
Impact of Direct Memory on jvm, jvm memory
Direct Memory
Direct Memory is an important issue. First, it is neither a part of the running data zone nor a part of the Java Virtual Machine specification. This issue is mainly relate
Stackoverflowerror and OutOfMemoryError exceptions.
Heap
The heap is the largest chunk of memory managed by the Java Virtual machine. The Java heap is an area of memory that is shared by all threads and is created when the virtual machine is started. The only purpose of this memory area is to hold the object instance, where almost all object instances allocate
Export JVM memory information on CentOS, and export jvm memory from centosFirst, check the Tomcat process Id:
[root@iZ25Z ~]# ps aux | grep javawww 2111 4.0 23.5 1637648 452756 ? Sl 10:12 4:35 /usr/java/jdk1.7.0_80/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties ... W
GC;
Heap Memory Allocation
The initial memory allocated by JVM is specified by-XMS. The default value is 1/64 of the physical memory. The maximum memory allocated by JVM is determined by-xmx. The default value is 1/4 of
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.