ref

http://blog.csdn.net/huangfan322/article/details/53220169

https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html

2.5.4. Method Area

The Java Virtual Machine has a method area that is shared among all Java Virtual Machine threads. The method area is analogous to the storage area for compiled code of a conventional language or analogous to the "text" segment in an operating system process. It stores per-class structures such as the run-time constant pool, field and method data, and the code for methods and constructors, including the special methods (§2.9) used in class and instance initialization and interface initialization.

The method area is created on virtual machine start-up. Although the method area is logically part of the heap, simple implementations may choose not to either garbage collect or compact it. This version of the Java Virtual Machine specification does not mandate the location of the method area or the policies used to manage compiled code. The method area may be of a fixed size or may be expanded as required by the computation and may be contracted if a larger method area becomes unnecessary. The memory for the method area does not need to be contiguous.

A Java Virtual Machine implementation may provide the programmer or the user control over the initial size of the method area, as well as, in the case of a varying-size method area, control over the maximum and minimum method area size.

The following exceptional condition is associated with the method area:

  • If memory in the method area cannot be made available to satisfy an allocation request, the Java Virtual Machine throws an OutOfMemoryError.

Java Method Area的更多相关文章

  1. Java Method Logging with AOP and Annotations

    Sometimes, I want to log (through slf4j and log4j) every execution of a method, seeing what argument ...

  2. 测者的测试技术手册:揭开java method的一个秘密--巨型函数

    揭开java method的一个秘密:巨型函数 相信,很多人都不知道Java的Method的上限为64K.本文将超过这个上限的函数叫做巨型函数. 巨型函数的问题 1.如果代码超过了这个限制,Java编 ...

  3. Calling a Java Method from Native Code

    http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/method.html Calling Java Method ...

  4. Java方法区(Method Area)

    方法区与Java堆一样,是各个线程共享的内存区域,他在与存储已被虚拟机加载的类信息,常量,静态变量,即时编译器编译后的代码等数据,虽然Java虚拟机规范把方法区描述为堆得一个逻辑部分,但是他却有一个别 ...

  5. java - 解释内存中的栈(stack)、堆(heap)和方法区(method area)的用法

    通常我们定义一个基本数据类型的变量,一个对象的引用,还有就是函数调用的现场保存都使用JVM中的栈空间: 而通过new关键字和构造器创建的对象则放在堆空间,堆是垃圾收集器管理的主要区域,由于现在的垃圾收 ...

  6. 测者的测试技术笔记:揭开java method的一个秘密--巨型函数

    相信,很多人都不知道Java的Method的上限为64K.本文将超过这个上限的函数叫做巨型函数. 巨型函数的问题 1.如果代码超过了这个限制,Java编译器就报"Code too large ...

  7. java method.isBridge

    作者:木女孩链接:https://www.zhihu.com/question/54895701/answer/141623158来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注 ...

  8. 方法区(Method Area)基础知识

    堆.栈.方法区堆关系 概述 方法区与堆区一样,是各个线程共享的内存区域 方法区在JVM启动时就会被创建,并且它的实际的物理内存空间中和Java堆区一样都可以是不连续的 方法区的大小,跟堆空间一样,可以 ...

  9. 解释内存中的栈(stack)、堆(heap)和方法区(method area)的用法?

    通常我们定义一个基本数据类型的变量,一个对象的引用,还有就是函数调用的现场保存都使用JVM中的栈空间:而通过new关键字和构造器创建的对象则放在堆空间,堆是垃圾收集器管理的主要区域,由于现在的垃圾收集 ...

随机推荐

  1. 【原】移动web资源整理(安卓、ios移动端兼容性问题归整)

     meta基础知识 H5页面窗口自动调整到设备宽度,并禁止用户缩放页面 <meta name="viewport" content="width=device-wi ...

  2. Android Activity的四种LaunchMode!!!

    本文转自: http://marshal.easymorse.com/archives/2950. 写的非常好,分享给大家!!! 在多Activity开发中,有可能是自己应用之间的Activity跳转 ...

  3. Android开发之ListView条目批量选择删除

    ListView实现的列表,假设是可编辑,可删除的,一般都要提供批量删除功能,否则的话,一项一项的删除体验非常不好,也给用户带来了非常大的麻烦. 实现效果图 详细实现代码 select.xml 主布局 ...

  4. POP按钮动画

    POP按钮动画 效果 源码 https://github.com/YouXianMing/Animations // // ButtonPressViewController.m // Faceboo ...

  5. post文件的html

    <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio& ...

  6. 前端新手如何安装webstorm ,初步搭建react项目

    下载安装webstorm:配置成功: 配置成功后就可以开启webstorm项目了.(存微信收藏..) 1:在webstorm下配置node环境: 2:完成之后: React官方脚手架地址: https ...

  7. 学习笔记:STL

    第一部分:(参考百度百科) 一.STL简介 STL(Standard Template Library,标准模板库)是惠普实验室开发的一系列软件的统称.它是由Alexander Stepanov.Me ...

  8. mybatis异常 :元素内容必须由格式正确的字符数据或标记组成。

    今天同事写一个查询接口的时候,出错:元素内容必须由格式正确的字符数据或标记组成. 错误原因:mybatis查询的时候,需要用到运算符 小于号:< 和  大于号: >,在mybatis配置文 ...

  9. Jquery解析Json格式数据

    今天稍微学习了一下Json,JSON (JavaScript Object Notation) 是一种轻量级的数据交换格式. 易于人阅读和编写.同时也易于机器解析和生成. JSON采用完全独立于语言的 ...

  10. C#汉字转拼音,可识别多音字,带声调,提供正向、逆向、双向分词算法的小程序

    用C#写了个汉字转拼音的小工具,和网上大部分工具不同,这个通过分词算法,解决了多音字的问题,并且提供声调,可开可关. 如题,用"银行 行不行 行家说了算"举例,如果转拼音却不能识别 ...