Skip to content
Advertisement

Tag: jvm

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,

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

Where is the super reference in a Java instance method’s stack frame?

I read Bill Venner’s excellent Inside the Java Virtual Machine book, which, in Chapter 5 explores in detail, among other things, the composition of a JVM’s stack frame. (This chapter from the book also happens to be officially published here: https://www.artima.com/insidejvm/ed2/jvm8.html) Apart from this book I studied relatively much the runtime data areas of some JVM’s, especially their stack and

What is the difference between Address and Reference in Java?

First of all, I know that Java is call by value. However, in a certain article, there is no such thing as an address in Java, and you should use the word reference. In my opinion, both words are interpreted with the same meaning. Am I wrong? What is the difference between address and reference, and do you have such

OpenJDK 8 interpreter debug

I want to see how the JVM interpreter works. Can I track function calls using NetBeans or GDB? And how will it be more convenient to do this? I’m interested in starting HelloWorld with the -Xint option and see what steps are taken and see the interpreter source code. I mean not only the result of the interpreter, but also

Advertisement