Related ConceptsConcurrency and parallelismThese two nouns are concepts in concurrent programming, which can be explained in the context of the garbage collector.
Parallel (Parallel): Refers to multiple garbage collection threads working in parallel, but at this point the user thread is still in a wait state.
Concurrency (Concurrent): User threads are executed concurrently with the garbage collection thread (but not necessarily in paralle
Serial collector: Single thread, "Stop the World", must stop all worker threads when doing garbage collection threads;
Parnew collector (Parallel parallel): Multi-threaded, garbage collection will also stop the worker thread;
Both can be used in conjunction with the CMS (concurrent Mark Sweep) collector, and all three are concerned with minimizing the downtime
This is the last GC-related article, the LZ is just a list of key parameters related to the garbage collector in the Hotspot JVM, as well as explanations of each parameter. Don't say much nonsense, this begins.
Garbage collector selection Parameters
USESERIALGC: Open this parameter using the serial serial old collector (client mode defaults).
USEPARNEWGC: Ope
cross-library operations and customize the data source for the report. The advantage of this approach is that it is flexible, theoretically any operation can be done through the program, and the disadvantage is that it is too difficult to write. Many high- level languages such as Java lack effective support for set operations, there is no corresponding class library, resulting in a simple group to write a lot of (loop) code, not to mention that the association will be after the group summary an
may require different memory, we can only know when the program is running, which objects will be created, this part of the memory allocation and recycling is dynamic, The garbage collector is concerned with this part of memory, and the "Memory" allocation and recycling in the subsequent discussion of this book refer only to this part of memory. Object is dead?
The heap contains almost all of the object instances in the Java world, and the firs
Java provides the most basic file processing functions, you can simply unstructured to read into small text files, if you encounter the need for structured, diverse format, require special files or memory cannot fit large files, the corresponding code will be very complex, readability and reusability is difficult to protect.Use the free collector to compensate for this deficiency. The collector encapsulates
End ProcessingJava has a garbage collector that reclaims memory resources that are occupied by useless objects. But the garbage collector only knows to release the memory allocated through new, and if we get a "special" area of memory in another way, we need to do the cleanup ourselves. Java provides a finalize () method to solve this problem. Finalize () Method :How it works: Once the garbage
Parameters
Description
-xx:+useserialgc
The JVM runs the default value in client mode, and after this switch is turned on, memory recycling is performed using the collector combination of Serial + Serial old
-xx:+useparnewgc
After you turn on this switch, use Parnew + Serial old collector for garbage collection
-xx:+useconcmarksweepgc
Usin
part of the memory allocation and recycling is dynamic, The garbage collector is concerned with this part of memory, and the "Memory" allocation and recycling in the subsequent discussion of this book refer only to this part of memory.Object is dead?The heap contains almost all of the object instances in the Java world, and the first thing the garbage collector can do before it recycles the heap is to dete
OverviewThe program counter, the local method stack, and the virtual machine stack are threaded and extinguished with the thread. Java heap and method area are different, this part of memory allocation and recycling is dynamic, the garbage collector is concerned about this part of memory.An algorithm for judging whether an object is garbageThe JVM does not use the reference counting algorithm to manage memory, and the main thing is that reference coun
Tags: collector databaseThe collector can read data from the database, write data to the database, or call the database's stored procedures. Based on these three basic operations, the collector can be applied to a variety of database-related scenario tasks:1. Data Analysis and presentation tasks, the process is:
read the data from the database by sq
I have been busy for a few days, so I have nothing to do with learning. I started reading books later. I think I still have 10 books. Oh. This winter vacation is very difficult.
The following content is excerpted from Java programming thoughts and further sorted out
In the Previously Used programming languages, it is very expensive to allocate objects on the stack. Therefore, readers will naturally feel that all objects in Java(Except for basic types)The allocation method is also very high. How
processing of all garbage collection work, because there is no need for multi-threaded interaction, so the efficiency is higher. However, it is also not possible to use the advantages of multiple processors, so this collector is suitable for single processor machines. Of course, this collector can also be used on multiprocessor machines with a small amount of data (around 100M). Can be opened using-XX:+USE
Introduction to V8 garbage collection mechanismThe implementation of the V8 garbage collector is a very important reason for V8 efficiency.V8 automatically reclaims object memory that is no longer needed at run time, which is also garbage collection.V8 uses a combination of full-pause (Stop-the-world), generational (generational), and precise (accurate) garbage collection mechanisms to ensure faster object memory allocations, shorter pauses when garba
mark and purge steps are inefficient, followed by memory fragmentation.3 ) Mark - Collation AlgorithmSimilar to the tag-purge algorithm, but in the second step of memory reclamation, the surviving object is moved to one end of the memory to eliminate the memory fragmentation problem.4 ) Generational collection algorithmJava Sun hotspot Virtual machine divides the memory into the Cenozoic (heap), the old Generation (heap), the permanent generation (the method area, the Chang, the real-time compi
The collector can easily invoke the stored procedure of the database, here is an example to see the specific program.
Call a stored procedure with no return value
using Oracle 's stored procedures as an example, the stored procedure has only one input parameter and no output parameters:Create Orreplace procedure Pro1(PID in VARCHAR)AsBeginINSERT into EMP values (PID, ' Mike ');Update emp set name= ' Rose ' where id=pid;CommitEndYou can u
How does the Garbage Collector work? Let me give a brief introduction.
First, we need to clarify the following points:
Java allocates space for objects on the heap.
The garbage collector is only related to memory. What is Io, network connection, and P?
When the number of available memory is low, the sun version of the garbage collector will be activated
Before th
Java Garbage Collector standard explanation and usage, java garbage collectionOverview
When talking about Garbage Collection (GC), most people regard this technology as a companion product of the Java language. In fact, GC has a long history than Java. The Lisp, which was born on MIT in 1960, is the first language that truly uses the dynamic memory allocation and garbage collection technology. When Lisp was still in the embryonic period, people were t
Oracle proposes to use G1 as the default Garbage Collector for Java 9
Oracle is considering including JEP 248 in Java 9's JEP list, that is, using G1 as the default Garbage Collector in server configuration. This decision has sparked some debate in the Java Community, and many people think that the concurrent tag and scan CMS) Collector may be more appropriate.
ObjectiveThe garbage collection algorithm has been described in more detail here, we will introduce the specific garbage collector in the JVM, in the virtual machine specification is not how to implement the garbage collector, so each manufacturer's garbage collector may be completely different, However, we are introducing the JDK1.7-based hotspot virtual machine
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.