-
Is CAS compare and set or compare and sweep?
is CAS compare and set or compare and sweep, or are these two different things ...
-
How does the JMX (Java Management Extensions) getCollectionTime method calculate GC time?
in JAVA, running programs can be managed and monitored through the JMX interface.
you can obtain the program GC through the open function of JMX, as follows:
public class TestJMX {
public static void main(String[] args) {
List<GarbageC...
-
On the problem of CMS algorithm in gc recovery
https: www.cnblogs.com ggjuc.
this article says:
< H2 > 1 CMS will not defragment the heap, so in order to prevent full gc, from causing heap fragmentation, merge the fragments by opening the CMS phase: < H2 >
does this mean that after CMS full g...
-
What is the understanding of "floating garbage" in JAVA: CMS garbage collection?
< H2 > the book says: during the concurrent cleanup phase, the user thread is still running, and new garbage may be generated during this period. New garbage cannot be removed this time GC, but can only be cleaned up next time. These rubbish have a profe...
-
The main method executes the exception exit program and does not exit all the time.
< H2 > the main method executes an exception and does not exit the program all the time < H2 >
A RuntimeException,Spring container startup interrupt is thrown in the static code block of the class, but the program has not been terminated. I don t kn...
-
How to solve the problem of cyclic invocation by train algorithm
Let s not talk about the principle of the train algorithm here. the train algorithm is the gc algorithm used by the G1 collector
D _ C are three objects that need to be called to each other. There are no other citations. But when the algorithm sc...
-
Is there any difference in execution between using fully qualified names in Java and using import?
ask two questions:
is there any difference in jvm execution between using fully qualified names and using import, except for the difference in length? If there is a difference, which is more efficient?
use the class name. What is the difference in ...
-
Why does JAVA have multiple classloaders? can't one?
Why does JAVA have multiple loaders I know that the function of the loader is to get the binary byte stream through the class name. It is mainly divided into four kinds of loaders: startup class-> extension class-> application class-> custom class. I al...
-
Where is the instance of the [Java] object stored in the Java virtual machine stack (VM Stack)?
for example, the member variable of a class:
Object obj = new Object();
obj is an instance of an object. In a broad sense, it is stored on the "stack " and points to the memory address on the "heap ". Specifically, I have the impression that obj sho...
-
Java disassemble view instructions.
in the process of learning Java, there are some problems that you need to use Java disassembly tool javap to view bytecode instructions, but there are some problems when viewing bytecode instructions, assuming the following simple code,
public static v...
-
Ask for help. Under linux, the memory of the java process has been rising slowly.
Use the top command to check memory under linux.
at first it seems to be stable at 800m, but the memory increases by 23m every ten minutes or so.
it is suspected that there is a memory leak, and it is normal and stable to use visualVM to observe the...
-
What operations does the Java memory model guarantee to be atomic?
as the title shows, many books and materials do not explicitly mention which operations are atomic, which is very important in writing concurrent programs. ...
-
If you want to develop a monitoring tool for JVM, what should you learn?
what should I learn if I want to develop a monitoring tool for JVM? ...
-
How to implement a method in Java replacement or hot replacement rt.jar?
public class Main{
public staic void main(String[] args){
System.out.println(Class.forName("a.b.old.C"));
}
}
Class.forName needs to be changed due to some special requirements, and when using this method, if the package name o...
-
Why can't operations after volatile read be reordered?
there is some doubt about the reading semantics of volatile: Why can t normal read and volatile read after volatile read be reordered? volatile read I know it is to fetch variable values directly from main memory, but since they are both reads, will i...
-
How to get JVM core dump (core dump)?
I want to dump all the classes loaded by the virtual machine through the ClassDump in sa-jdi.jar.
ClassDump supports dump classes from jvm processes or jvm core dump.
for online applications, you should not dump, pid directly if you want to get a co...
-
Now that web development doesn't use jsp, why does jvm compile (jit), dynamically instead of compiling (aot) in advance?
as mentioned above, I understand that the benefits of runtime compilation can be that you can save startup time and do hot deployment hot replacement (such as jsp hot replacement) , but in fact, when website development does not need jsp, to launch, the ...
-
How to modify the jvm parameter of tomcat itself?
you can modify the jvm parameters of an application in catalina.sh by declaring JAVA_OPTS, at the beginning of tomcat. Here are two places I do not quite understand, ask the bosses to advise: 1. If you set the jvm maximum heap memory limit to 2G here, d...
-
How to locate the local method source code corresponding to a Java local method in the jvm source code?
for example, how does java.lang.Object-sharpwait (), locate it in the jvm source code? ...
-
What's the point of System.gc ()?
jvm has its own gc strategy, so what s the point of using System.gc ()? ...