Memory, as an important resource in the system, plays a key role in the stable operation and efficient operation of the system, unlike languages like Java and C, which do not require the developer to allocate memory and reclaim memory, but rather the JVM manages the allocation of object memory and the collection of object memory (also known as garbage Collection, GC). This greatly reduces the difficulty of writing the program for developers, but one s
Deep knowledge of JVM learningPrefaceI believe a lot of people like me long-term use of Java programming, but very little attention to the JVM bottom-up implementation, which is largely because the JVM design is very sophisticated, so the project rarely encountered problems involving the JVM. But on the one hand, for t
Heap memory Setting principle JVM heap memory is divided into 2 blocks: Permanent space and heap space.
Permanent is the persistent generation (Permanent Generation), which mainly holds Java class definition information, which is not related to the Java objects that the garbage collector collects.
Heap = {old + new = {Eden, ' from ', to}},old is the older Generation, NEW is the young Generation (Generation). The division of old generation
What is a JVMThe JVM contains three layers, abstract specifications, using the specification to define a virtual computer, the virtual computer has its own instruction set, a specific implementation, according to the abstract specification, for different hardware platforms, has implemented a virtual machine, an instance of a running virtual machine, after the implementation of the virtual machine, To use a virtual machine, you first create an instance
Many Java interviews, will ask about the Java garbage collection problem, mentions that garbage collection must involve the JVM memory management mechanism, the Java language execution efficiency has been ridiculed by C, C + + programmers, in fact, the fact is that Java in the implementation of efficiency is really very low, on the one hand, The Java language adopts object-oriented thinking, which also determines that the development efficiency is hig
To support Cross-platform features, the Java language uses source code to compile intermediate bytecode, and then the JVM of each platform interprets how it executes. Bytecode is described in a completely platform-independent manner, Java only gives the specification of bytecode format, and does not specify the final source of bytecode, it can be in addition to the Java language, other than language generation, as long as the bytecode specification is
as we know, the Sun JVM divides the garbage collector into 3 pieces of heap space: Young Gen: The younger generation, which includes 1 Eden Districts and 2 suvivor areas, the newly created objects (most of which are short cycle objects) will enter this area, where virtual opportunities are frequently garbage collected. Old Gen: older generation, when the object in young Gen long enough (after several garbage collection still exist) or young Gen space
Label: style blog HTTP Io color ar Java
Memory architecture of Java Virtual Machine
After learning about the JVM basics, let's take a look at the memory architecture of the Java Virtual Machine. This is a prerequisite for understanding the JVM garbage collection algorithm, after understanding the memory structure, we can optimize different parts according to our program. The Java heap and sta
Connection: http://my.oschina.net/sunchp/blog/3697071.JVM memory modelJVM Runtime memory = Shared memory area + Thread memory Area1). Shared Memory AreaShared memory Area = Persistent Band + heapPersistence Band = Method Area + OtherHeap =old Space+young SpaceYoung Space=eden+s0+s1(1) Durable beltThe JVM implements the method area with the persistence band (Permanent Space), which mainly holds all loaded cl
Background
User: The goods are arrived, shopping cart how to have just bought things, what?Products: There are users reflect, bill of lading completed, how not clear shopping cart, research and development to see if there is a bug ah?Research and development: Well, let me see! @#¥%......* () A wild look, search GA, then on the line, restart the application, the asynchronous task lost ...Product: Can line, on-line you lose the task, throw not ashamed Ah!R d:............
Go online!
generationUsed to store static type data, such as Java Class, Method, and so on. Persistent generations have no significant impact on garbage collection. However, some applications may dynamically generate or invoke some classes, such as Hibernate CGLib, where it is often necessary to set a large, persistent generation space to store dynamically increasing types during these runs. So, when a group of objects are generated, the memory request process is as follows:
The
the same conditions, the larger the heap space, the longer the time spent in a GC, and the longer the pauses are generated.
2.6.2 thought: Divide the heap space into contiguous small areas, each small area is used independently and recycled independently.
3. Supplement
3.1 Generation serial garbage collector, using the idea of a copy algorithm.
3.1.1 Foundation: The Cenozoic is divided into Eden area, from zone, to area. The From and to zones are also known as survivor Zones, which can be cons
From: http://www.cnblogs.com/shiyangxt/archive/2009/01/06/1370627.html thanks to the author Shi Yang
A jvm crash error was reported during JNI the other day. The error message is as follows:
## An Unexpected error has been detected by hotspot virtual machine:## Exception_access_violation (0xc0000005) at PC = 0x009fcf52, pid = 4752, tid = 4440## Java VM: Java hotspot (TM) Client VM (1.5.0 _ 14-b03 Mixed Mode)# Problematic frame:# V [
Reprinted: SCID network http://java.ccidnet.com/art/3737/20060427/531299_1.html
1. jvm gc Overview
GC (garbage collection mechanism) is used by JVM to release the memory occupied by objects that are no longer in use. The Java language does not require JVM to have GC, nor does it specify how GC works. However, common JVMs have GC, and most GC uses similar algorit
From: http://hi.baidu.com/fvsd3/blog/item/9baec09a301bdebcc9eaf4a2.html
I. JVM memory area composition
Java divides memory into four types:1. Stack segment: automatically assigned and released by the compiler, stores function parameter values, local variable values, and so on. After the specific method is executed, the system automatically releases memory resources.2. Heap segment-it is usually assigned and released by programmers to store the objects
message size is greater than this value will be compressed, if the compression function, the default value is 2048.Compressablemimetype: The type of compression that specifies which types of files are compressed to data.Nocompressionuseragents= "Gozilla, Traviata": Compression is not enabled for the following browsers.If the code has been separated, static pages and pictures and other data will not need tomcat processing, then there is no need to configure the configuration in Tomcat compressio
First, Detailed introduction1. JVM-Java Virtual machineThe JVM is what we often call Java virtual machine, it is the entire Java implementation cross-platform of the most core part, all Java programs will be compiled into a. class file, which can be executed on the virtual machine, that is, class is not directly related to the machine's operating system, Instead, the virtual machine interacts with the opera
1. Creating a JVM load environment and configuration2. Loading JVM.dll3. Initialize JVM.dll and hang bounds to jnienv (JNI call interface) instance4. Call the JNIEnv instance to mount and process the class.A The JVM loads the environment and the JVM provides the dynamic connection file for the operating system.Since it's a file, it's just a matter of loading the
JVM monitoring:jmx or SNMP? By Daniel on Feb 23, 2007Since javaTM SE 5.0, the JRE provides a means to manage and monitor of the Java Virtual machine. It comes in Flavors:one are based on the Java Management Extension (JMXTM) and the other is a small SNMP agent T Hat builds upon the Management and monitoring API of the Java SE platform and exposes the same information through SNMP.A legitimate question that often arises to newcomers to the JMX and SNMP
As the saying goes, the code that you write, 6 months later is someone else's code ... Review! Review! Review! The knowledge points involved are summarized as follows:
Stacks are stacks
JVM stack and local method stack partitioning
Heap, stack, and Heap in Java, stack
Data structure-level heap, stack
OS-level heap, stack
How the JVM's heap, stack, and OS correspond
Why the call to the method requires a stack
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.