32位java 最大内存,Java 1.6 32位最小和最大堆内存问题

在尝试运行一个程序时遇到了Java虚拟机(JVM)初始化错误,提示无法分配足够的对象堆空间。问题根源在于32位系统的内存限制。尽管系统总内存为128GB,但32位JVM在Windows上只能期望获得1.4GB到1.6GB的堆内存。解决方案可能包括升级到64位JRE或者调整JVM参数以适应32位系统的限制。
摘要由CSDN通过智能技术生成

I have the JRE v1.6 that is 32-bit installed. When I attempt to run a program as follows:

java -Xms1024m -Xmx2048m net.analysis.MyProg

I see the following message displayed:

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine

As far as I know, the maximum heap allowed for a 32-bit JVM is 2 GB. On the computer running my code there is 131061 MB of physical memory (using Window's Task Manager, 128 GB of RAM).

Does anyone know what am I doing wrong here?

解决方案

In your case, the limit is most likely the 32 bit architecture and the way that Windows is apportioning the virtual address space.

According to the Oracle JVM FAQ, you can only expect to get 1.4Gb to 1.6Gb on a 32bit JVM on Windows.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值