Physical and Virtual Memory
The raw memory access classes and the physical memory classes dig down to real memory. This is far below the level the JVM ordinarily exposes to its users.
Here is one possible path from a Java-language object reference to a memory device:
The object reference is converted to the index of an object descriptor.
The object descriptor contains the address of the object.
The JVM loads a machine register from a field in the object it finds at the address of the object plus (say) 40. This is called a virtual address.
To load the register, the CPU places the virtual address on an address bus that carries it from the CPU to the memory management unit (MMU). The MMU basically strips the high-order 20 bits (a page number) off the ...
Get Real-Time Java™ Platform Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.