问二:你了解JAVA的内存模型(JMM)吗?

原理图:

    

注:java8中,已经将常量池移动到堆中

 

部件详解:

 

 

举例:执行add(1,2)

Method area is created on virtual machine startup, shared among all Java virtual machine threads and it is logically part of heap area. It stores per-class structures such as the run-time constant pool, field and method data, and the code for methods and constructors.

 

 

 

 

全部评论

相关推荐

10-11 17:45
门头沟学院 Java
走吗:别怕 我以前也是这么认为 虽然一面就挂 但是颇有收获!
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务