这些类都定义在包中:jdk/src/hotspot/share/oops/ oop:ordinary object pointer # 零、oopDesc基类 0.1 对象访问定位 如果对象访问定位采用 句柄,那么句柄中 指向实例数据的指针应指向 oopDesc实例的地址,指向对象实例类型的指针仍指向方法区。 如果对象访问定为采用 直接指针,那么这个指针就是 oopDesc实例的地址。所以这时oopDesc实例中应有指向方法区中java对象类型的指针。 hostSpot使用直接指针定位对象。 0.2 oopDesc定义 // jdk/src/hotspo
2.5 Heap The Java Virtual Machine has a heap that is shared among all Java Virtual Machine threads. The heap is the run-time data area from which memory for all class instances and arrays is allocated. The heap is created on virtual machine start-up. jvms里并没有规定object的内存结构,所以应该是交给
jvms14 :Chapter 2. Data Types Run-Time Data Areas The PC Register Java Virtual Mechine Stacks Native Method Stacks Heap Method Area Run-Time Constant Pool This chapter gives an overview of the Java Virtual Machine architecture. 一、Data Types Like the Java programming language, the
JAVA虚拟机 把描述类的数据 从 class文件 加载到内存,并对数据进行校验、转换解析和初始化,最后形成可以被虚拟机直接使用的指令和数据 的这个过程 叫做虚拟机的类加载机制。 JAVA类加载的 加载、连接、初始化过程整个发生在 程序运行期间。虽然比起编译型程序多了类加载过程的开销,但是增加了程序的扩展性和灵活性。 一、一个class文件从硬盘到内存的整个生命周期 加载Loading -> [验证Verification,准备Preparation,解析Resolution] -> 初始化Initialization -> 使用Using -> 卸载U