问二:你了解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.

 

 

 

 

全部评论

相关推荐

我即大橘:耐泡王
点赞 评论 收藏
分享
有工作后先养猫:太好了,是超时空战警,我们有救了😋
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务