method Stack (local stack), when the thread terminates, the memory space occupied by the three (virtual machine stack, local method stack, and program counter) is also freed. This is why I divide the memory area into thread sharing and non-thread sharing, and the three areas of non-thread sharing have the same life cycle as the owning thread, while the areas shared by the threads are the same as the Java program's life cycle. So this is where the system garbage collection takes place only in th
1. Basic structure of the JVM1.1. Class loading SubsystemThe class loading subsystem is responsible for loading class information from a file or network, and the loaded information is stored in the memory space of the method area. The method area may also contain run-time constant information, including string and numeric constants. (This part of the constant information is the memory map of the constant pool portion of the class file.)1.2. Java HeapT
What is a JVM?Virtual machine, byte code, platform IndependentThe JVM divides the memory structure according to the storage structure of the runtime data, and the JVM divides them into several different data formats when operating Java programs, which are stored in different regions, which are collectively known as runtime data. Runtime data includes the data inf
If you really want to master the Java technology, first remember its four components: Java language, class file format, JVM and Java API.
If you have learned Java, you already know that Java has two environments: the compiling environment and the running environment. Well, we will discuss them separately.
1) compiling environment
What is the compiling environment? If JDK is installed, everything in your
1.JVM Start-up processjava XXX---> Mount configuration----> Find JVM.dll based on configuration---> Initialize JVM to get JNIEVN interface---> Find Main method and run| | |Based on the current path JVM.dll the JVM JNIEVN as the JVM interface, FindclassAnd the
Phenomenon:Eclipse was well spent the day before, but it can't be used today, what's going on?Solution:Please refer to other network information first:http://www.baidu.com/s?wd=eclipse+jvm+terminated.+exit+code%3d1rsv_bp=0rsv_spt=3 inputt=14728If you modify the Eclipse.ini, unplug the memory and so on can not solve the problem, you may refer to the following methods:Delete all the JDK (at least the newest one, mine is 1.6update35) and reload the JDK (
Java's JVM's memory is mainly divided into 3 extents: heap (heap), stack (stack), and method area (methods) "PS: Secondary: Local method Stack, program counter"
Heap Area:1. All objects are stored, each containing a class-corresponding information. (The purpose of class is to get operation instructions)2.JVM only one heap area (heap) is shared by all threads, and the heap does not hold basic types and objec
various literal and symbolic references, This section is stored in the run-time pool of the method area after the class is loaded.**7) Direct Memory: **nio introduces a channel-to-buffer-based I/O method that can be used to directly allocate out-of-heap memory using the native library and then operate through a Directbytebuffer object stored in the Java heap as a reference to this memory. Significantly improved performance. Limited by native memory.O
I recently learned about JVM, mainly about hosspot. Here I will give a rough look at it.
1. Structure of the hotspot JVM
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/46/6F/wKioL1PyO4uym9mxAAGc8JnqaLY552.jpg "Title =" 1.png" alt = "wkiol1pyo4uym9mxaagc8jnqaly552.jpg"/>
Describes the general structure
Java heap Oom (out-of-memory) exceptionRun the following procedure to burst the exception Java.lang.OutOfMemoryError:Java heap space/** * VM args:-xms20m-xmx20m-xx:+heapdumponoutofmemoryerror * @author Zzm */public class Heapoom {static Class Oomobject {}public static void main (string[] args) {listAnalysis:1. Memory configurationThe size of the-xms20m heap is 20MThe-xmx20m heap can scale up to 20M, because the heap size is 20M so the heap cannot be e
An error occurred. I don't know why the original eclipse was good. This morning, something went wrong and JVM terminated was thrown when it couldn't be started. exit code =-1. After checking the information on the Internet, many people have such problems as me. Thanks to our predecessors.
The following error occurs when eclipse cannot be started:
JVM terminated
-core CPU environments.
Parallel Scavenge collector (Stop-copy algorithm)A parallel collector that pursues high throughput and uses CPUs efficiently. Throughput is typically 99%, throughput = user thread time/(user thread time +GC thread time). Suitable for background applications, such as the corresponding requirements for the interaction of the scene is not high.
Parallel Old collector (Stop-copy algorithm)Parallel scavenge collector's old version, parallel collector, throughput priori
trivial matter. If reference is included, that is, object instance = new object (); that is, 12 bytes, 4 bytes indicates the space occupied by the reference.
Class student {
Int nmber;
Boolean isgood;
Object teacher;
}
Size: 8 (empty object) + 4 (INT size) + 1 (Boolean size) + 4 (size referenced by teacher) = 17 bytes, in Java, the object memory is allocated by an integer multiple of 8 and is allocated to 24 in sequence. The object size is 24 b
Originally wanted to write a blog about the Java class loading mechanism, later found that the subject is a bit large, which involves too much detail, a blog post, words I am afraid can not speak clearly, so decided from the whole to the local, first to talk about the life cycle of class, from the overall grasp a class from "Born" to "apoptosis" process, It involves the class loading, using, unloading and so on each stage, has the whole cognition, then thorough detail and unifies the concrete ex
After ec3.2, myec5.5, and jdk6.10 are used, the EC crashes. Sometimes, during compilation or use, the system will force exit. The error message is as follows:
JVM terminated. Exit code = 1
C:/jdk6_10/bin/javaw.exe
-Dosgi. splashlocation = D:/myeclipse55/Eclipse/myeclipsesplash.bmp
-Xms128m
-Xmx512m
-Jar E:/Eclipse/startup. Jar
-OS Win32
-Ws Win32
-Archx86
-Launcher E:/Eclipse/eclipse.exe
-Name eclipse
-Show
Virtual machines can work in client and server mode:The server mode attempts to collect more system performance information and optimize the program using more complex optimization algorithms.Therefore, when the system is fully up and running, the server mode executes much faster than the client mode.---The default system parameters for the client mode can be queried as follows:This optimization should be the simplest, there is no good explanation, master bypass do not spray.Small white
Jvm and other loaders (1 ).
First, let's look at a sample program:
Package com. tfdd. test;/*** @ desc class load validation * @ author chenqm * @ date February 1, February 2, 2016 */class Singleton {private static Singleton singleton = new Singleton (); public static int count1; public static int count2 = 0; private Singleton () {count1 ++; count2 ++;} public st
Original:Understanding Java Garbage Collectionjvm--Become a Java GC expert (1)What are the benefits of understanding how the Java garbage collection mechanism (garbagecollection, referred to as GC) works? As a software engineer, to satisfy his curiosity to understand him is one of the reasons, and understand that the GC works more to let us write better performance, more robust Java applications.This is just my personal concept, but I believe that bei
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.