- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
这是 64 位 Windows 7 Enterprise
和 64 位 Java 7:
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
这发生在使用 C:\Windows\SystemWOW64\cmd.exe
(我错误地认为是 64 位版本)和的 shell 中 C:\Windows\System32\cmd.exe
(我刚刚发现,由 Pulsar 提供,尽管有路径名称,但它是一个 64 位应用程序)。
程序本身很简单:
public class Trivial
{
public static void main(String[] args) {
System.out.println("total = " + toMB(Runtime.getRuntime().totalMemory()));
System.out.println("max = " + toMB(Runtime.getRuntime().maxMemory()));
}
private static long toMB(long bytes) {
return bytes / (1024L * 1024L);
}
}
我只是在玩弄不同的 -Xmx
和 -Xms
参数,看看会发生什么。尽管在 64 位 Windows 上使用 64 位 Java,我可以使用几乎任何我想要的最大大小和初始堆,但事实并非如此。
java -Xmx16G -Xms2G Trivial
(例如)工作正常。但是,java -Xmx16G -Xms4G Trivial
给我:
Error occurred during initialization of VM
Could not reserve enough space for object heap
更奇怪(对我来说),java -Xmx16G -Xms3G Trivial
给出了不同的错误:
Error occurred during initialization of VM
Unable to allocate tables for parallel garbage collection for the requested heap size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
尝试拆分 2G
和 3G
之间的差异,看看是否有特定大小发生这种情况我尝试了 java -Xmx16G -Xms2900M Trivial
并且有效。然后我尝试了 -Xms2960M
并且成功了。使用 -Xms2970m
JVM 崩溃了:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 1048576 bytes for E in C:\jdk7u2_64p\jdk7u4\hotspot\src\share\vm\utilities/taskqueue.hpp
# An error report file with more information is saved as:
# C:\Users\QuantumMechanic\Temp\hs_err_pid10780.log
这一直持续到 -Xms2995M
时,它切换回“无法为并行垃圾收集分配表”消息并随着 -Xms
的进一步增加而坚持下去。
可能发生了什么?从 cmd.exe
(即使是 64 位的)启动某些东西是否会施加一些进程大小限制? Windows(或 JVM)是否需要一个巨大的内存块? (但是为什么会有不同的消息)?还有别的吗?
最佳答案
SysWoW64 指的是 32 位 Windows on Windows 64
。简化:32 位 Windows 在 64 位 Windows 上运行)。
因此您明确要求在 32 位 cmd shell 中运行。
请看:
关于java - 无法在堆大小较大的 64 位 Windows 7 中运行 64 位 JVM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10889081/
我正在通过 PHP 将 .csv 中的两行插入到表中。 我还会跟踪任何错误,如果发生错误,我不会提交事务。插入表后,我检索结果行的 ID(全部在一个事务中提交),并且 csv 的第一行对应于第二个 I
一个应用程序托管一个具有三个接口(interface)的 Web 服务,用于三个单独且独立的操作,所有这些操作都在应用程序的不同组件中实现,彼此独立,例如在不同的包等中,所以他们对彼此了解不多,只共享
我希望在单击特定表格数据单元格时同时选中单选按钮和单选按钮单击事件。我已经使用以下方法实现了这一点: $(document).ready(function() { $("td").click(
JSFiddle:https://jsfiddle.net/oyp1zxaq/ 本质上,我只是想在较大的 div 中放置四个具有定义宽度的较小 div,但我希望它们在其中间隔开。 我想知道是否有一种方
我在一个布局中有两个 View 。我将分别称它们为 View A 和 View B。 ┌──────┐ │┌─┐┌─┐│ ││A││B││ │└─┘└─┘│ └──────┘ 父布局(包括View A
我是一名优秀的程序员,十分优秀!