A summary of Java Analysis-java virtual machine memory model
1 Program Calculator
Program counter is a small amount of memory spaceEach thread has a separate program counter that records the next instruction to run, and the program calculator between the threads does not affect each other, it is a thread-private
run-time data regionDeep understanding of Java memory areas of Java virtual machinesImage.pngProgram counterThe line number indicator of the byte code executed by the current threadJava Virtual machine stack (memory model for Java methods)Each method creates a stack frame at
much, the body collapsed. I still have a blood pill. Stay with me a lot. I remember, I will be grateful. The biggest is home and loved ones.Tell us:
Health first, the capital of revolution. It's easy to say, it's hard to do. (try to be regular, whether you stay up late)
And keep optimistic, it's good for your body.
Moderate amount of exercise
Some details to note and try: Bubble foot ....
Two. TextI want to combine my own story and say it's really sad. But I'm not care
Record a Java Memory Leak analysis and a java leakCurrent Environment Code address
Git address: https://github.com/jasonGeng88/java-network-programmingBackground
Not long ago, a new project was launched. This project is a stress testing system, which can be viewed as a replaying Vocabulary (http request data) and conti
Java Virtual Machine memory management principle basics, Java Virtual Machine
Jdk: Java programming language, Java virtual machine, and Java API class library.
Jdk is the minimum environment used to support
Previous blog "Dead java Concurrency"-in-depth analysis of the volatile implementation principle has described the characteristics of volatile:
volatile visibility; For a volatile read, you can always see the final write of this variable;
volatile atomicity; volatile is atomic for a single read/write (32-bit long, Double), except for composite operations, such as i++;
A "memory barrier" is
First, use the jdk built-in tool jmap dumping (dump) java memory heap data to local files. The jmap dump command format is as follows:Jmap-dump: Dump-options can have the following three parameters, separated by commas:Live: only dump active objects. If not specified, dump all objectsFormat = B, byte stream formatFile = The following is an example of the dump command:Jmap-dump: format = B, file = heap. bin
One of the most significant advantages of Java is memory management. You simply need to create the object without being responsible for freeing the space, because the Java garbage collector is responsible for the recycling of the memory. However, the situation is not so simple that
A thread-private area of memory is reclaimed as the user thread ends, the memory allocation compilation period is determined, and memory allocation and reclamation are deterministic. Shared threads are created and destroyed as virtual machines start, end, and are dynamically allocated at run time. The garbage collector primarily collects garbage collection for sh
Java Virtual Machine (2) automatic memory management mechanism, Java Virtual Machine1. Summary
In the deep understanding of Java Virtual Machine (JVM) study Note 1 Automatic Memory Management Mechanism (I), we listed the following issues:This article mainly summarizes questi
12th Java memory model and threadingJava memory modelMain memory vs. working memory:The Java memory model specifies that all variables are in main memory, and each thread has its own wo
Java Virtual machineJava Virtual machine is a Java file generated by the class file, the class file is the bytecode, the JVM can explain the bytecode becomes the machine code of the target machine, so the Java program can be compiled once and then run around the real implementation of the cross-platform features, The JVM is key in cross-platform features. includi
Read Catalogue
What is a memory leak?
Why is there a memory leak?
How do I prevent memory leaks?
One of the most obvious advantages of Java is its memory management mechanism. You simply create objects, and Java's garbage collection mechanism is respons
on the characteristics of the processor (multi-level cache system, multi-core processor, etc.), so that the machine instruction is more consistent with the performance of the CPU and maximizes the machineSpecial Memory operationsVolatile modified variables: visibility; Disable command reordering optimizationFinal field: The final field value can be seen in the other thread once it is initialized in the constructorSpecial rules for long and double var
A memory leak means that an object or variable that is no longer being used by a program is occupied in memory. Java has a garbage collection mechanism that ensures that an object is no longer referenced, that is, when an object becomes orphaned, and the object is automatically purged from memory by the garbage collect
Understanding the benefits of the Java Virtual Machine memory mechanismWhen we need to solve some tricky problems, such as performance optimization, to solve the oom anomaly, if we understand the memory mechanism of the Java Virtual machine, we know where to begin to deal with these problems.How to understand me from t
Run-time data regionThe Java Virtual machine divides the memory it manages into several different data regions during the execution of a Java program. These areas have their own uses, as well as the creation and destruction of time, and some areas exist as the virtual machine process starts, and some areas are built and destroyed depending on the start and end of
Java memory overflow and java Overflow
Program countersA program counter is a small piece of memory, which is private to the thread and can be seen as a counter for executing bytecode in the current thread. In the virtual machine conceptual model, the bytecode interpreter uses this counter to find the next command t
JMM Specification:I. Concept: Regulates how Java Virtual machines and computer memory work together, and it specifies how and when a thread can see the values of shared variables modified by other threads, and how to access shared variables synchronously when necessary.Note: If two threads invoke the same method of the same object at the same time, they will access the object's member variables, at which po
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.