Java virtual machine: Difference between revisions

Content deleted Content added
Tags: Reverted Mobile edit Mobile web edit Disambiguation links added
m Reverted 1 edit by 2405:9800:B860:9CC2:5141:1018:8F23:6F79 (talk) to last revision by Xose.vazquez
 
(4 intermediate revisions by 3 users not shown)
Line 45:
| 7u4 - 8 || rowspan="2" | Serial, Parallel, CMS, G1
|-
| 9 - 10 || rowspan="89" | G1
|-
| 11 || Serial, Parallel, CMS, G1, ''Epsilon (E)'', ''ZGC (E)''
Line 60:
|-
| 24 || Serial, Parallel, G1, ''Epsilon (E)'', Shenandoah, GenZGC, ''GenShen (E)''
|-
| 25 || Serial, Parallel, G1, ''Epsilon (E)'', Shenandoah, GenZGC, GenShen
|-
| colspan="3" | <small> ''(E)'' = ''experimental''</small>
Line 86 ⟶ 88:
The JVM has a garbage-collected heap for storing objects and arrays. Code, constants, and other class data are stored in the "method area". The method area is logically part of the heap, but implementations may treat the method area separately from the heap, and for example might not garbage collect it. Each JVM thread also has its own [[call stack]] (called a "Java Virtual Machine stack" for clarity), which stores [[Call stack#STACK-FRAME|frames]]. A new frame is created each time a method is called, and the frame is destroyed when that method exits.
 
Each frame provides an "operand stack" and an array of "local variables". The operand stack is used for operands to run computations and for receiving the return value of a called method, while local variables serve the same purpose as [[ProcessorsProcessor register|processregisters]] and are also used to pass method arguments. Thus, the JVM is both a [[stack machine]] and a [[register machine]]. In practice, HotSpot eliminates every stack besides the native thread/call stack even when running in Interpreted mode, as its Templating Interpreter technically functions as a compiler.
 
===Bytecode instructions===