First, the JVM memory structureThe Java Virtual opportunity divides the memory into several different management areas, each of which has its own purpose, depending on the characteristics of different tasks and the use of different algorithms in garbage collection. The whole is divided into the following sections:Program Counter Register, JVM virtual machine stack (JVM Stacks), local method Stack (Native methods Stacks), Heap (heap), method areaSuch as:1. Program counter (Programs Counter Regist
BEA WebLogic jrockit usage and Performance Tuning
1. Introduction to jrockit OptimizationJrockit is an adaptive JVM that can automatically adjust itself to adapt to the underlying hardware. Therefore, its optimization is mainly focused on parameters that require manual intervention, such: the number of Ram resources to be allocated to jrockit. Jrockit has a set of non-standard-x startup options that we can use to adjust JVM. Jrockit has two major grou
Counter Register)This is a relatively small amount of memory, not on the RAM, but directly divided on the CPU, the programmer can not directly manipulate it, Its role is: when the JVM interprets the bytecode file (. Class), the line number that stores the bytecode that the current thread executes is just a conceptual model, and the bytecode interpreter works by changing the value of the program counter to select the next command to execute, branching
A Introduction to JRockit Tuning
JRockit is an adaptive JVM that automatically adjusts itself to the underlying hardware, so its tuning is focused on some parameters that require manual intervention, such as how much RAM to use for JRockit. JRockit has a set of non-standard-X startup options that we can use to tune the JVM. JRockit has two main sets of subsystems that can be optimized-memory management systems (including garbage collection) and threa
, it is not related to the contents, no matter what area,The storage is still an object instance and is further divided to better reclaim memory, or to allocate it more quicklyMemory. In this chapter, we only discuss the role of memory areas, and the various areas of the Java heapDetails such as allocation and recycling will be the subject of the next chapter.According to the Java Virtual Machine specification, the Java heap can be in a physically discontinuous memory space, as long asIt's logic
The 12864 dot matrix LCD module (LCM) is a 128*64-row array consisting of 128*64 LCD display points. Each display point corresponds to a binary number. 1 indicates bright, and 0 indicates extinct. The ram that stores the dot matrix information is called the display data storage. To display a graphic or Chinese character, you need to write the corresponding dot matrix information to the corresponding storage unit. The dot matrix information of graphics
1.OutOfMemoryError
Determine if a heap overflow or stack overflow after throwing an exception
Memory leak: Memory Leak failed to release the requested RAM after applying to memory, which is why an object has been referenced this way.
Memory overflow: The memory OverFlow: There is not enough room to use when applying for RAM, throw oom.
You can use Eclipse Memory Analyzer or Jprofiler (I
Causes of Tomcat memory overflow
In the production environment, if Tomcat memory is not set properly, memory overflow may easily occur. Memory overflow is caused by different processing methods.
Here we will summarize the situation and relevant information. There are three common cases:
1. outofmemoryerror: Java heap Space
2. outofmemoryerror: permgen Space
3. outofmemoryerror: Unable to create new Native thread.
Tomcat memory overflow Solution
In the first two cases, you can set the Tomcat JVM
Release a new product and try it out. The local machine is win7_x64, but for the convenience of work, the machine has installed four JDK from 32-bit jdk1.5 to 64-bit jdk1.6. To ensure that the running status of most people is the same, the 32-bit jdk1.6 is still used to run the product.
As a result, I first encountered a crash problem when the application server got up.
The generated JVM error log is as follows:
## There is insufficient memory for the Java Runtime Environment to continue.# Nati
the stored data will survive in the heap.*Static storage area and constant Storage Area-- The static storage area is used to store static variables.--The constant storage area is used to store the value of the constant type (final) type, generally in read-only memory.* Non-ram Storage-- A stream object is sent to another machine.-- Persistent objects are stored on disks.2. Java Memory Allocation-- The basic data type is directly allocated in the stac
JVM memory management, garbage collection, and jvm Memory Management
I. JVM Memory Structure
The Java Virtual Machine divides the memory into several different management zones. These regions have their own purposes. Based on their characteristics, they undertake different tasks and use different algorithms for garbage collection. It consists of the following parts:
Program Counter Register, JVM Virtual Machine stack (JVM Stacks), Native Method Stacks, Heap, and Method Area)
For example:
1. Pro
allocation table, from 0KB to 640KB (address 000000H~109FFFFH), a total of 640KB of capacity. Because it is in the front of the memory and in the Dos manageable memory area, we also call it low DOS memory (lower DOS RAM), or called Basic memory, the program that uses this space has BIOS, Dos operating system, peripheral device driver, interrupt vector table, Some resident programs, free memory space, and general application software can be executed i
the size of the VM heap:
² The heap size should be set to an appropriate value so that the maximum amount of memory used by the VM does not exceed the available physical RAM. If this value is exceeded, the OS starts paging and performance decreases significantly. The VM always uses more memory than the heap size. In addition to the heap size setting, you also allocate the internal VM functionality, the local libraries outside the VM, and the memory
In the Windows environment, modify the "%tomcat_home%\bin\catalina.bat" file to add the following settings at the beginning of the file:Set java_opts=-xms256m-xmx512mTo modify the "%tomcat_home%\bin\catalina.sh" file in the Linux environment, add the following settings at the beginning of the file:java_opts= '-xms256m-xmx512m 'Where-XMS sets the initial memory size,-XMX sets the maximum memory that can be used.--------------------------------------One
Data area for Virtual runtime
Thread sharing
Java Heap
Java Heamp is the largest memory area in which Java virtual machines can be configured, and the only purpose is to store instance objects, shared by all threads;
GC Heap, the recycling technology mainly uses the generational collection algorithm; Java heap is subdivided into: Cenozoic, Laosheng generation; The partitioning itself is not related to the contents of storage; No matter how divi
needs to be avoided by-xms the heap to a higher size (and -xmx).Here's a comparison of memory leaks and memory overflows:memory leak memories leak: Refers to the program after the application of memory, can not release the memory space has been applied, a memory leak does not seem to have a big impact, but the memory leak accumulation after the consequences of memory overflow;memory overflowout of memory: An OOM error occurs when the program has appl
Deep Java core Java memory allocation principle explainingIntroduction: Stack, heap, Chang, although the same is the Java memory allocation operation area, but its scope of application and function is very different. This article will delve into the Java core and explain in detail the knowledge of Java memory allocation.Java memory allocation and management is one of the core technologies of Java, before we introduced the Java memory management and memory leaks and Java garbage collection knowle
no stack pointer in the heap, so there is no way to get support directly from the processor.-the benefit of the heap is that there is great flexibility. As the Java compiler does not need to know how many storage areas to allocate from the heap, it is not necessary to know how long the stored data will survive in the heap.* Static storage area and constant storage area--static storage to hold variables of type static--The constant store is used to hold values of the constant type (final) type,
", because the Jinshan system is using the low-end of the expansion of memory, this area if there are other programs reside, the font can not be loaded normally, Using the INT15 parameter to set aside a portion of the traditional expansion memory (that is, not by the XMS specification managed by the INT15 directly used by the expansion of memory), the font and the DOS kernel can use the expanded RAM, so tha
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.