The CLR garbage collector divides objects according to the size of the space they occupy. Large objects and small objects are handled in a very different way. For example, memory defragmentation-the cost of moving large objects in memory is expensive, let's look at how the garbage collector handles large objects, and what the potential impact of large objects has on program performance.
Large object heap and garbage collection
In. Net 1.0 and 2.0, if an object is larger than 85000byte, it is c
often used together (Program Locality Principle), it is very important to provide a continuous blank memory space for the program.
2. Generation)
Aging means to divide objects in heap into generations based on the length of time they exist,The shortest score is in The 0th generation, the longest score is in the 2nd generation, and the objects in the 2nd generation are usually relatively large.. The generation level is related to the Framework ver
no longer referenced, and reclaim the corresponding memory. The garbage collection mechanism uses the Mark Sweep algorithm to complete the above tasks. The whole process is divided into two steps:Step 1. mark-Sweep: Starting from the root of the application, uses the mutual reference relationship to traverse all the objects dynamically allocated on the Heap, specify the objects to be recycled, and Mark the surviving objects, mark it.Step 2. compact: moves the surviving objects in the memory, mo
The Qianyi "Dragon ice five generations" 1U chassis adopts an innovative integrated design concept of "Chassis + radiator, A passive heat sink with a large heat dissipation area called "qianniu" is directly cooled by a powerful fan in the chassis, which greatly improves the air volume and heat sink area of the CPU cooling fan, it has produced epoch heat dissipation results. In addition, a black heat radiation and efficiency coating is sprayed on the s
This algorithm greatly reduces memory fragmentation and does not require twice times as much space as the copy algorithm.
The tag-grooming algorithm uses the tag-sweep algorithm to mark objects in the same way, but when it is cleared, all surviving objects are moved to the left-hand free space after reclaiming the space occupied by the objects that are not alive, and the corresponding pointers are updated. The tag-collation algorithm, which is based on the tag-purge algorithm and moves the
PrefaceCMS, full name concurrent low Pause Collector, is a new GC algorithm introduced by the jdk1.4 later version, which has been further improved in Jdk5 and JDK6, and its main fit scenario is that the need for response time is greater than the throughput requirements. The ability to tolerate garbage collection threads and application threads to share processor resources, and to apply applications where there are more long-life-cycle objects. CMS is used to recycle tenured generation, which is
principle, all objects allocate memory on the heap area. According to the Java Virtual Machine specification, heap memory needs to be logically continuous (not physically necessary), when implemented, can be fixed-size or extensible, the current mainstream of virtual machines are extensible. If there is still not enough memory allocation and no expansion after the garbage collection is performed, the OutOfMemoryError:Java Heap Space exception will be thrown. 5) Method areaIn the Java Virtual Ma
Why to divideWhy do we need to divide the heap into generations? Can't you do what he's done without being generational? In fact, there is no substitute, the only reason for generational is to optimize GC performance. First you think, if there is no generational, then all of our objects are in one piece, the GC when we want to find out which objects are useless, so that all areas of the heap will be scanned. Because each collection needs to traverse a
recycling. The basic assumption of this strategy is that the longer the surviving object, the less likely it is to become garbage in later programs. Our programs tend to produce a large number of objects, many objects quickly produce and disappear, but there are also some objects that are used for a long time. For the sake of trust and efficiency, we believe in the usefulness of these "longevity" objects, so we reduce the frequency of scanning them in garbage collection.Python divides all the o
names Specific description s0c Capacity of the first Survivor (Survivor area) in the Young Generation (bytes) S1c Capacity of the second survivor (Survivor area) in the younger generation (bytes) T02 The first survivor (Survivor area) of the young generation has currently used space (bytes) s1u The second survivor (Survivor area) of the young generation has currently used space (bytes) EC The capacity of Eden (Eden) in the Young Generation (bytes) EU The young generation of Eden (Eden) has curr
throw a Outofmemoryerror:java heap space exception.
There is much more to the heap area, which is described in detail in the next section, "Java Memory allocation mechanism."
5, methods area: In the Java Virtual Machine specification, the method area is treated as a logical part of the heap, but in fact, the method area is not a heap (non-heap); In addition, many people blog, the Java GC's generational collection mechanism is divided into 3 generations
the heap of objects in accordance with the length of time to divide, the shortest points in the No. 0 generation, the longest in the 2nd generation, the 2nd generation of objects tend to be relatively large. The generation hierarchy is related to the framework version and can be learned by calling Gc.maxgeneration. Typically, GC takes precedence over those recently allocated objects (No. 0 generation), which is the same as the "least recently used" algorithm of the operating system classic me
bytecode. After the thread is created, the program counter (PC) and stack (stack) are generated, and the program counter holds the offset of the next instruction to be executed in the method, and the stack frames are stored in each stack frame, and each stack frame corresponds to each call of each method, and the stack frame is made up of the local variable area and the operand stack. Local variables are used to store local variables and parameters in the method, which are used to store the int
StatisticsC:\Users\Administrator>jstat -gc 2060 S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT20480.0 20480.0 0.0 13115.3 163840.0 113334.2 614400.0 436045.7 63872.0 61266.5 0.0 0.0 149 3.440 8 0.295 3.735
1
2
3
1
2
3
S0C: The size of the first surviving area
S1C: The size of the second surviving area
S0U: The use
Outofmemoryerror:java heap space exception.
There is much more to the heap area, which is described in detail in the next section, "Java memory allocation mechanism ."
5, Method area: In the Java Virtual Machine specification, the method areas are treated as a logical part of the heap, but in fact the method areas are not heaps (NON-HEAP); In addition, many people blog that Java The GC's generational collection mechanism is divided into 3 generations
output[Count]: number of consecutive outputsoption Parameter overviewThe Class class loader behavior statistics. Statistics on the behavior of the classLoader. Compiler hotspt JIT compiler behavior statistics. Statistics of the behavior of the HotSpotJust-in-time compiler. Behavior statistics for GC garbage collection heap. Statistics of the behavior of the garbage collectedHeap. Gccapacity each garbage collection generation capacity (Young,old,perm) and their corresponding spatial statistics.
adjusted) when the free heap memory is less than 40%, the JVM increases the heap until the maximum limit of-xmx.
-xmx
Maximum Heap Size
Physical memory of the quarter (
The default (maxheapfreeratio parameter can be adjusted) when the free heap memory is greater than 70%, the JVM reduces the heap until the minimum limit of-XMS
-xmn
Young generation size (1.4or lator)
Note : The size here is (eden+ 2 survivor space). It is different from
SCSI InterfaceFC-Represents: Fiber, provides up to 100mb/s data transfer rates, and supports hot-swappable WD-Rep: 68-pin Ultra Wide SCSI interfaceLW-Representative: 68-pin Ultra-2 SCSI (LVD) interfaceLC-representative: 80-pin Ultra-2 SCSI (LVD) interfaceAccording to the above, we can interpret the number as: Seagate hard disk, 3.5-inch half-height hdd, capacity of 120GB, with NCQ technology, the use of dual platters, for the 7th generation of Cool Fish 7200 series products (commonly known as 7
Show Column names
Specific description
s0c
Capacity of the first Survivor (Survivor area) in the Young Generation (bytes)
S1c
Capacity of the second survivor (Survivor area) in the younger generation (bytes)
s0u
The first survivor (Survivor area) of the young generation has currently used space (bytes)
s1u
The second survivor (Survivor area) of the young generation has currently used space (bytes)
register, which is also created when the thread starts. The contents of the PC register always point to the next hungry address where the instruction will be executed, where the address can be either a local pointer or an offset relative to the method's start instruction in the method area.5, Native method Stack (local methods stack): Save Native method to enter the address of the zoneOnly the heap and method area are shared by all threads, while Java stack, program counter, and native method s
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.