Java virtual machine: Difference between revisions

Content deleted Content added
m External links correction process; see User:Kate/extlinks
No edit summary
Line 10:
Each [[Thread (computer programming)|thread]] has its own program counter.
 
Code verification is applied to bytecode class files by the runtime at program load time. This means that only a limited amount of bytecode sequences form valid programs, e.g. a JUMP (branch) instruction can only target an instruction within the same function. Because of this, the fact that JVM is a stack architecture does not imply a speed penalty for emulation on register based architectures when using a JIT compiler: In face of the codeverified JVM architecture, it makes no difference to a JIT compiler whether it gets named imaginary registers or imaginary stack positions that need to be allocated to the target architectures registers. In fact, code verification makes JVM different to a classic stack architecture whose efficient emulation with a JIT compiler is more complicated and typically carried out by a more slowslower interpreter.
 
Code verification also ensures that arbitrary bitpatterns cannot get used as an address. [[Memory protection]] is achieved without the need for an [[Memory management unit|MMU]]. Thus, JVM is an efficient way of getting memory protection on simple silicon that has no MMU.