Background We have a pool of aproximately 20 linux blades. Some are running Suse, some are running Redhat. ALL share NAS space which contains the following 3 folders: /NAS/app/java - a symlink that points to an installation of a Java JDK. Currently version 1.5.0_10 /NAS/app/lib - a symlink that points to a version of our application. /NAS/data - directory where our output is written
背景 我们拥有大约20个linux刀片库。 有些正在运行Suse,有些正在运行Redhat。 全部共享包含以下3个文件夹的NAS空间: / NAS / app / java - 一个指向安装Java JDK的符号链接。 目前版本1.5.0_10 / NAS / app / lib - 一个指向我们应用程序版本的符号链接。 / NAS / data - 写入输出的目录 我们所有的机器都有2个处理器(超线程),4GB物理内存和4GB交换空间。 我们将每台机器在给定时间可以处理的'工作
This question already has an answer here: Where are static methods and static variables stored in Java? 7 answers static members : permanent generation(heap) local variable : stack memory which is not heap. refer here http://tutorials.jenkov.com/java-concurrency/java-memory-model.html It depends on the Java version you are using: Pre Java8: statics (just like other "permanent&quo
这个问题在这里已经有了答案: 在Java中存储静态方法和静态变量在哪里? 7个答案 静态成员:永久代(堆) 局部变量:堆栈内存不是堆。 请参阅http://tutorials.jenkov.com/java-concurrency/java-memory-model.html 它取决于您使用的Java版本: Pre Java8:静态(就像其他“永久”事物一样)存储在PermGen 。 它只是年轻一代和老一代的记忆模型的一部分。 Java8:这里PermGen被删除了! 出于多种原因,例如很难对
I know that the static method and non-static method of a class all store in the method area. But I am really in doubt that where does Java stores the final variable(constant) members and static variable members of an object. For example, class A{ private final int a = 1; private static int b = 2; private static final int c = 3; //other codes... } I wonder where does Java
我知道一个类的静态方法和非静态方法都存储在方法区域中。 但我真的怀疑Java在哪里存储对象的最终变量(常量)成员和静态变量成员。 例如, class A{ private final int a = 1; private static int b = 2; private static final int c = 3; //other codes... } 我想知道Java在内存中存储a,b,c的位置。 堆,堆栈或方法区域? ======更新===== 嘿,谢谢你的帮助。请允许我分享有关jvm组件的链接
Until Java 7 there was an area in JVM memory called PermGen , where JVM used to keep its classes. In Java 8 it was removed and replaced by area called Metaspace . What are the most important differences between PermGen and Metaspace? The only difference I know is that java.lang.OutOfMemoryError: PermGen space can no longer be thrown and the VM parameter MaxPermSize is ignored. The main dif
在Java 7之前,JVM内存中有一个名为PermGen的区域,JVM用于保留其类。 在Java 8中,它被删除并被称为Metaspace的区域所取代。 PermGen和Metaspace最重要的区别是什么? 唯一的区别是我知道java.lang.OutOfMemoryError: PermGen space不能再被抛出,VM参数MaxPermSize被忽略。 与用户角度的主要区别 - 我认为以前的答案没有足够强调 - 是默认情况下 , Metaspace会自动增加其大小(直到底层操作系统提供的内容),而PermGe
Or it does NOT use Heap "Data-Structure". The name given to the Memory for allocation(Pool of Memory) is just known as "Heap"? If yes, then is that any relation between Heap Data-Structure and Heap as in Pool of Memory? There's no relation between heap memory and heap the data structure. They just happen to share the same name. Are you talking about the difference
或者它不使用堆“数据结构”。 分配内存的名称(内存池)被称为“堆”? 如果是,那么Heap Data-Structure和Heap之间的任何关系就像在内存池中一样? 堆内存和堆数据结构之间没有关系。 他们碰巧分享了同一个名字。 你在谈论堆内存和堆栈内存之间的区别吗? 我会解释它,但这个答案是非常甜蜜的 什么和堆栈和堆在哪里?
Was PermGen Space in Java 6 not a part of Heap Memory? I got this question while reading about PermGen space allocation in java 7. As per Java 7 it says its a part of heap memory, this means that there is no fixed size limitation. So method area(PermGen) is logically a part of heap. That brings me to notice, that method area was not a part of heap before java 7. If not then how the PermGen w
Java 6中的PermGen空间不是堆内存的一部分? 我在阅读关于Java 7中的PermGen空间分配时遇到了这个问题。根据Java 7,它说它是堆内存的一部分,这意味着没有固定的大小限制。 所以方法区域(PermGen)在逻辑上是堆的一部分。 这让我注意到,在java 7之前,这个方法区域并不是堆的一部分。 如果没有,那么PermGen如何在java 6中分配以及在哪个内存下分配? 通常,分配给JVM的整个内存被Java开发人员称为堆内存,因为堆是主
Is there a Command-line Tool (Linux) to check Heap Size (and Used Memory) of a Java Application? I have tried jmap. But it gives info. about internal memory areas like Eden/PermGen etc., which is not useful to me. I am looking for something like: Max Memory: 1GB Min Memory: 256 MB Heap Memory: 700 MB Used Memory: 460 MB Thats all. I know i can see this in JConsole etc., but i nee
是否有命令行工具(Linux)检查Java应用程序的堆大小(和已用内存)? 我试过jmap。 但它提供了信息。 关于像伊甸园/ PermGen等内部记忆区域,这对我没有用处。 我正在寻找像这样的东西: 最大内存:1GB 最小内存:256 MB 堆内存:700 MB 使用的内存:460 MB 就这样。 我知道我可以在JConsole等中看到这一点,但我需要一个命令行工具(无法启用JMX等) 任何这样的工具/命令? 每个Java进程都有一个pid ,您
I'm writing a simple memory reporting utility (in this particular situation using an existing tool is not an option). I've got it to print the max, commit and usage for all the memory pools returned by iterating ManagementFactory.getMemoryPoolMXBeans() . That gets me the three heap generations of heap memory (eden, survivor and old), the permgen, and the "code cache". None o
我正在编写一个简单的内存报告实用程序(在这种特殊情况下使用现有工具不是一种选择)。 我已经得到它来打印由迭代ManagementFactory.getMemoryPoolMXBeans()返回的所有内存池的最大值,提交和使用情况。 这让我获得了三代堆内存(eden,幸存者和旧),permgen和“代码缓存”。 这些似乎都不是方法堆栈内存。 最接近的东西似乎是“代码缓存”,但我已经读过,这实际上是热点放置编译类的地方。 我问,因为我试图追查一个没有
The JVM Specification (JSE 8 Edition) mentioned: Page 12: 2.5.2 JVM Stacks: "Because the JVM stack is never manipulated directly except to push and pop frames, frames may be heap allocated." Page 15: 2.6: Frames: "Frames are allocated from the JVM stack of the thread creating the frame." And on Page 16: "Note that a frame created by a thread is local to that thread a
JVM规范(JSE 8版)提到: 第12页:2.5.2 JVM堆栈:“因为除了推送和弹出帧之外,JVM堆栈不会被直接操作,所以可能会分配堆。” 页面15:2.6:框架:“框架从创建框架的线程的JVM堆栈中分配。” 并且在第16页上:“请注意,由线程创建的框架对于该线程是本地的,并且不能由任何其他线程引用。” 这听起来让我感到困惑。 由于帧是创建帧的线程本地的,为什么在堆中分配帧,因为堆是在所有JVM线程之间共享的? 除非在这里遗漏某
Let's say we have a class: class Class1 { int i = 1; } and we have a variable: Class1 ob1 = new Class1(); Does a reference itself stored in a variable ob1 store the information that it refers to an object of Class1 ? Does the part of the heap where Class1 is stored store the information that it is of Class1 type? How does logically looks like this information? It's a string li
假设我们有一堂课: class Class1 { int i = 1; } 我们有一个变量: Class1 ob1 = new Class1(); 引用本身存储在变量ob1存储它引用Class1对象的信息? Class1存储的堆的部分是否存储Class1类型的信息? 在逻辑上如何看起来像这样的信息? 它是一个像application1.Class1的字符串或对某些引用类型池的引用? 如果您能推荐这些信息的来源,我将非常感谢您提供该信息,我无法在参考书中找到它。 引用本身存储在变量