JVM Tutorials - Herong's Tutorial Examples - Version 4.23, by Dr. Herong Yang
PC Register and Native Method Stack
This section describes PC Registers and Native Method Stacks, which are reserved one per thread. Normal Java applications do not have any significant impact on PC Registers and Native Method Stacks.
We have quickly tested 4 types of runtime data areas, Method Area, Heap, Direct Memory, JVM Stack. The rest 2 types of runtime data areas, PC Registers and Native Method Stacks, are not easy to play with, because:
1. A PC (Program Counter) Register contains the address of the instruction currently being executed in its associated thread. The PC Register is very small data area and has a fixed size. Java applications do not have any impact on its content and size.
2. A Native Method Stack stores similar data elements as a JVM Stack and it is used to help executing native (non-Java) methods. To play with a Native Method Stack, we need to integrate some native program codes into Java applications.
Last update: 2014.
Table of Contents
Downloading and Installing JDK 1.8.0 on Windows
Downloading and Installing JDK 1.7.0 on Windows
java.lang.Runtime Class - The JVM Instance
java.lang.System Class - The Operating System
ClassLoader Class - Class Loaders
Class Class - Class Reflections
JRockit JVM 28.2.7 by Oracle Corporation
Method Area Expansion Demonstration
OutOfMemoryError on the Method Area
Method Area Growth with Dynamically Generated Classes
Garbage Collection Issue with Dynamically Generated Classes
Interned Strings Stored in Heap
Direct Memory Expansion Demonstration
allocateMemory() Method on Direct Memory
JVM Stack Expansion Demonstration
►PC Register and Native Method Stack
Memory Management and Garbage Collectors
JVM Stack, Frame and Stack Overflow
Thread Testing Program and Result
CPU Impact of Multi-Thread Applications
I/O Impact of Multi-Thread Applications
Micro Benchmark Runner and JVM Options
Micro Benchmark Tests on "int" Operations
Micro Benchmark Tests on "long" Operations
Micro Benchmark Tests in JIT Compilation Mode