- 浏览: 197759 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
sucheng2016:
SYBASE的字段类型 -
sushi1025:
MySQL删除重复数据行,只保留一条 -
793059909:
看不懂,能否简单解释下。更常见的做法是把需要保留的数据放一张临 ...
MySQL删除重复数据行,只保留一条 -
zyllezi:
困扰了好久,终于解决了,多谢博主
使用PHP访问MySQL,Apache httpd.exe报错
As experience has shown, sometimes a sort of uncertainty may arise on the subject of Java Virtual Machine (JVM) memory structure and other related aspects such as sizes of various kinds of memory, live and dead objects, etc. In this article, we shall try to illuminate these issues to clear up the point. The JVM memory consists of the following segments: The JVM has a heap that is the runtime data area from which memory for all class instances and arrays are allocated. It is created at the JVM start-up. The heap size may be configured with the following VM options: By default, the maximum heap size is 64 Mb. Heap memory for objects is reclaimed by an automatic memory management system which is known as a garbage collector. The heap may be of a fixed size or may be expanded and shrunk, depending on the garbage collector's strategy. Also, the JVM has memory other than the heap, referred to as non-heap memory. It is created at the JVM startup and stores per-class structures such as runtime constant pool, field and method data, and the code for methods and constructors, as well as interned Strings. Unfortunately, the only information JVM provides on non-heap memory is its overall size. No detailed information on non-heap memory content is available. The abnormal growth of non-heap memory size may indicate a potential problem, in this case you may check up the following: If the application indeed needs that much of non-heap memory and the default maximum size of 64 Mb is not enough, you may enlarge the maximum size with the help of Heap and non-heap memory usage telemetry is shown on the "Memory" tab: Allocated and used memory sizes are shown on the graphs for both heap and non-heap. The allocated memory is an overall amount of memory allocated by the JVM, whileused memory is the amount of memory which is actually in use. Obviously, the allocated memory cannot be less than the used memory. The exact amount of allocated memory is determined by the JVM internal strategies. Used heap memory consists of live and dead objects. Live objects are accessible by the application and will not be a subject of garbage collection. Dead objects are those which will never be accessible by the application but have not been collected yet by the garbage collector. Such objects occupy the heap memory space until they are eventually collected by the garbage collector. Note that Class list view in memory telemetry shows both live and dead objects. You may observe the decreasing number of objects when garbage collection occurs automatically or it is forced with the help of the corresponding toolbar button. In memory snapshots, all views show only live objects. And all the sizes you deal with are of the live objects, too. The exception is Dead Objects view. Objects size in "Memory" tab can be less than the used memory shown in "Telemetry". This may be due to: All individual objects, as well as sets of objects have their shallow and retainedsizes. Shallow size of an object is the amount of allocated memory to store the object itself, not taking into account the referenced objects. Shallow size of a regular (non-array) object depends on the number and types of its fields. Shallow size of an array depends on the array length and the type of its elements (objects, primitive types). Shallow size of a set of objects represents the sum of shallow sizes of all objects in the set. Retained size of an object is its shallow size plus the shallow sizes of the objects that are accessible, directly or indirectly, only from this object. In other words, the retained size represents the amount of memory that will be freed by the garbage collector when this object is collected. In general, retained size is an integral measure, which helps to understand the structure (clusterization) of memory and the dependences between object subgraphs, as well as find potential roots of those subgraphs. Dead objects are shown only with shallow size, as they do not actually retain any other objects. Read more about shallow and retained sizes.Heap and Non-Heap Memory
Heap
-XX:MaxPermSize
VM option. For example, -XX:MaxPermSize=128m sets the size of 128 Mb.Allocated and Used Memory
Used Heap Memory: Live and Dead Objects
Object Sizes in Memory Snapshots
Shallow and Retained Sizes
发表评论
-
Double Checked Locking双重检查锁
2017-03-07 13:16 667要使Double Checked Locking双重检查锁模 ... -
Singleton的线程安全
2017-03-07 12:59 724网上可以找到很多种Si ... -
通过JMX取本地JVM内存使用信息
2016-05-18 06:35 1547import java.io.BufferedWriter; ... -
9个主流的开源许可协议[整理]
2013-05-10 07:27 1163转自:http://univasity.iteye.co ... -
自定义ANT Listener
2011-08-13 10:48 928package com.doit.util; im ... -
java的volatile是什么意思
2010-09-02 16:08 978转自:http://qingfeng825.iteye ... -
读写锁的使用
2010-09-02 12:05 1542转自:http://www.blogjava. ... -
java多线程(创建线程的两种方式)
2010-08-31 17:39 1537转自:http://hi.baidu.com/moonha ... -
关于Jconsole
2010-02-02 15:58 901使用Jconsole命令监控Java进程,如果想使用远程监控, ... -
Oracle启动停止命令
2009-10-27 16:26 8561、启动数据库: oracle@suse92:~> ... -
启动ORACLE
2009-10-21 09:25 698sqlplus /nolog; connect sys/s ... -
ORACLE创建用户
2009-09-14 09:32 1095CREATE TABLESPACE qsh_DAT ... -
Spring AOP——轻松实现代理
2009-05-15 11:16 1676本文依然参考夏昕的Spring开发指南(下载自满江红)。 ... -
Java动态代理我之理解
2009-05-13 17:08 1395参考:Spring开发指南(作者:夏昕) --------- ... -
详细解析抽象类和接口的区别
2009-05-12 09:36 9372009-05-12 09:34:23 来 ... -
ibatis SQL Map demo
2009-05-10 17:51 2767在spring的jpestore中,数 ... -
使用JDOM创建XML文档的DTD
2009-05-08 15:09 2262首先,创建public的DTD。不知道public形式的DTD ... -
查看sybase版本信息
2009-05-08 14:12 2652select @@version -
Sybase存储过程报transaction mode错误
2009-05-05 11:42 5212报错信息: 11:17:53,375 ERROR [A ... -
JBoss使用Sybase报(JZ006: 捕获到 IO 例外)JZ0C0: 连接已关闭。
2009-03-31 16:09 11314JBoss在default/deploy下使用sybase ...
相关推荐
6. **类文件结构(Class File Structure)** - Java类文件格式定义了如何组织类的数据,包括字段、方法、属性等。 7. **类加载器(Class Loader)** - 类加载器负责读取字节码文件(.class),解析出构成类或接口的...
### 使用JNA替代JNI调用DLL,并解决内存溢出问题 #### 问题背景 在项目的开发过程中,常常遇到需要处理二进制流数据并对其进行解析处理的情况。这种情况下,如果上层应用平台采用的是Java开发,而底层算法或数据...
2. understanding the memory structure of recursive methods 3. using loops to replace recursion whenever possible 4. being careful with the recursive depth to avoid stack overflow errors 在实际开发中...
- **Overview**: Provides insights into the internal structure of Java class files and the bytecode format, essential for understanding how the JVM executes Java code. - **Key Areas**: - **Class File ...
Gradle and the New Project Structure Gradle and Dependencies Manifest Merger Rules Signing Your App Distribution Advanced Gradle for Android Tips Testing with JUnit4 Testing with UI Automator ...
JNI是Java虚拟机(JVM)提供的一套标准接口,允许Java代码与本地代码交互。JNA通过JNI桥接,将Java对象映射到本地内存,然后调用本地函数。 3. **Memory Management**:JNA负责管理Java对象和本地内存之间的映射。...
mcc -m -R -singleCompThread -R -nodisplay -R -nojvm foo.m -I libs/ -o foo -d bin/ for a standalone single-threaded executable. Single-threaded executables are useful when running the tools on ...
24. **内存条 (Memory Module)**:插入主板内存插槽的存储组件,用来扩大系统内存。 25. **印刷电路板 (Printed Circuit Board)**:承载电子元件的板子,通过导电路径连接元件。 26. **数据总线 (Data Bus)**:在...