I understand that when the Eden is full, a minor garbage collection is done. Surviving objects go to the survivol spaces. These objects will eventually arrive to the old generation. Does the objects in the survivol spaces get garbage collected as well, or they will just be moved to the tenure generation and be GC there later (so the survivol
Tag: jvm
When not to use volatile,it still can see the changes which issued by other thread
if it does not have the following codes, it will not show “end”. if it has these codes, it will probably show “end”. Sometimes it does not show. when is less than 598 or not have these codes, like use 550, it will not show “end”. when is 598, it will probably show “end” when is greater than 598, it
Why the java.lang.CharacterDataLatin1#digit function in JDK generates the whole digit byte array?
In the source code, it says that: Analysis has shown that generating the whole array allows the JIT to generate better code compared to a slimmed down array, such as one cutting off after ‘z’ So my questions are: What’s the root reason of this comment? Compared to the slimmed down array, how many performance can be improved? Answer This
How to inspect jvm module contents from the command line?
I would like to inspect the contents of a resource file of a java module of my locally installed jvm from the command line. Based on a question about mime type support in a jvm I would like to see the contents of /sun/net/www/content-types.properties in module java.base of my locally installed jvm. However when scrolling through the files installed for
What is the use of the “dup2_x2” instruction in JVM bytecode?
Java has a dup2_x2 instruction which, according to the documentation, has the following behavior: Duplicate the top one or two values on the operand stack and insert the duplicated values, in the original order, into the operand stack. Does javac produce bytecode with this instruction? What are its potential use cases? Answer For example, the following code compiles to See,
Print a value of an extended class object from mother class object
I’ve declared a table that has the mother class type and i’ve filled it with many objects that have the extended classe type, everything looks fine and the table is successfully filled, the problem is when i’m trying to access to the table values i cannot ( in the exemple i’m trying to get the salaire attribut ) MOTHER CLASS
What exactly happens in the JVM when invoking an object’s instance method?
I think I have finally found out how to word, what is giving me so much trouble in understanding: how the virtual machine can access a classes methods and use it only on a given instance (object) with the catch that the virtual machine is only being given the reference/pointer variable. This was compounded by the fact that most visualizations
How does java guarateee reserved memory
Checking for memory usage by stack using this command: I can see that reserved memory is different from committed. Reserved is about 1MB (default for stack). Committed in fact is physical reserved. I read that java save memory for stack while is not totally used. Running command like top I can see just committed usage. What does java/SO do in
Why is the number of threads in a java process different from the actual size of non-heap memory?
The sentences may be strange due to my lack of English knowledge Thanks to everyone who reads the question. Hello? I am running a java process on Centos7 and monitoring it with jconsole, but the number of threads currently created is different in non-heap memory size. I know that one thread occupies 1mb by default, but even if 100thread is
How is the count of method executions that triggers the omitted exception stack frames calculated in JDK 8?
JDK version: If we write the following code: Part of the output is: That is, the stack frame is no longer printed after the exception occurs 21124 times. Let’s make a small change to the above code, pay attention to the parameters of the nextInt method: Part of the output is: That is, the stack frame is no longer printed