Discover java 1 7 virtual machine, include the articles, news, trends, analysis and practical advice about java 1 7 virtual machine on alibabacloud.com
started after the initialization phase.(1). Loading:The Java Virtual machine loads the class file into memory and verifies, transforms, and initializes the data in the class file, resulting in the process of Java types that can be used directly by the
Welcome to other blogs on this topic:
Deep Dive into Java Virtual Machine (I)-detailed explanation of the underlying structure of Java Virtual Machine
Deep Dive into Java
Jingle: Pool heap, stack of stacks
Discard the pool, station music (a left the bathroom, stomach pain stand up)
The memory management mechanism in Java is managed automatically through the JVM. Understanding the fundamentals of the JVM helps to understand Java more.
We first need to understand the allocation mechanism of Java memory, in the
of the above garbage collector, may use the parnew garbage collector, may use the G1 garbage collector. There are many scenarios, and it is important to have a way to know what the garbage collector is using for object assignment when it is actually used, because understanding these principles is the first step in tuning. Here are two additional principles for object assignment:1, long-term survival of the object will enter the old age. Objects in th
), object references (reference types, which are not equivalent to the object itself and are implemented according to different virtual machines). It may be a reference pointer to the start address of the object, or it may point to a handle representing the object or other location associated with the object, and the ReturnAddress type (the address of a bytecode directive).The 64-bit length of long and double data takes up 2 local variable space (slot
Java architectureThe Java architecture consists of four independent but related technologies:1.Java programming Language2.Java class file format3.Java Application Programming Interface (API)4.
choice.Conclusion: not all problems can be solved by adjusting the JVM parameters, sometimes you just need to review your drawing board. (re-examine the design of the program)7. GC logs can lead to significant system overheadIn simple terms, this is wrong, especially under the default log configuration. Log data is extremely valuable, and Java 7 also introduces
This blog will provide a conceptual explanation of the various areas of Java Virtual Machine memory, the role of these areas, the service objects, and the problems that may arise, which is what we are prepared to do later on to learn about Java memory management.
Java
does not change the size of the local variable table while the method is running.6. In the Java Virtual Machine specification, two exceptions are specified for this area:1) If the thread requests a stack depth greater than the virtual m
Local method stack when a thread calls the native method, it enters a world not restricted by Java virtual machine. It can use registers of the local processor to allocate memory on any number of local stacks or use any type of stacks.The local method interface uses a certain type of local method stack. When the thread calls the
Java Virtual Machine (1) runtime data area
1. There is a "high wall" between Java and C ++ that is surrounded by the dynamic memory allocation and garbage collection technology. The people inside the wall want to go in, but they w
of short-term objects can be recovered as much as possible, reducing medium-term objects, while older generations store long-lived objects.Fragmentation problems caused by smaller heapsThe heap is not compressed because the old generation of concurrent collectors uses tags and clears the algorithm. When the collector recycles, he merges the adjacent space so that it can be assigned to a larger object. However, when the heap space is small, after a period of time, "fragmentation" occurs, if the
this almost unique method of knowing how the JVM garbage collector works in a production environment. The generally acceptable GC overhead is capped at 5%, which is trivial if you know the cost of the system for GC pauses and can take action to minimize the cost.Conclusion: In the capacity range, as much as possible to obtain the system in the production environment of the operational data, you will find that it is a new world.SummarizeHopefully the above conclusions will help you to better gra
, linking and initialization)
The class loading subsystem is not only responsible for locating and loading class files, but also does many other things according to the following strict steps: (for details, see Chapter 7 "class lifecycle ")
1) load: Find and import binary information of the specified type (class and Interface)2) connection: verification, preparation, and resolution① Verification: ensure the
garbage collection, first understand the internal architecture of the Java Virtual machine, as shown in The middle dashed box part is the run Time data region, which consists of 5 parts, namely the method area, heap, stack, program counter and local method stack. 1. Program counter
For a running
) { return (a + b) * (a - b); } public static void main(String[] args) { Hello t = new Hello(); System.out.print(t.foo(5, 3)); }}
Take the foo method in this Code as an example. After compiling it into a class file, decompile the class file to view the JAVA bytecode:
Code: 0: iload_1 1: iload_2 2: iadd 3: iload_1 4: iload_2 5: isu
is limited. The sum of the Java heap and direct memory is still limited by the maximum memory given by the operating system"5" garbage collection system---an important part of the >java virtual machine.---> Recycle garbage space on the method area, Java heap, direct memory.
execution.Load:The load phase is a phase in the class loading mechanism, which is often referred to as "loading," and is mainly done by:1. Obtain a binary byte stream that defines this class by "full name of Class"2. Convert the static storage structure represented by the byte stream to the run-time data structure of the method area3. Generate a Java.lang.Class object representing this class in the Java he
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.