32 位操作系统上的 JVM 堆大小 [英] JVM Heapsize on 32 bit OS
问题描述
我使用的是 32 位 win.7 并使用 Eclipse.还有 4GB 内存.
I am using 32 bit win.7 and using Eclipse. Also having 4GB RAM.
我想为我的 Java 应用程序分配大约 3 GB 的最大堆大小,但我能够通过 VM 参数 -Xmx1056m
分配最大 1.5GB.
I want to allocate my java application a maximum heapsize of around 3 GB, but I am able to allocate maximum 1.5GB through VM arguments -Xmx1056m
.
我该怎么办?如果我安装 64 位 win.7.那么它可以为我的应用分配 3GB 堆大小吗?
What should I do? If I Install a 64 bit win.7. it would be able then to allocate 3GB heapsize to my app?
推荐答案
一个普通的 32 位 Windows 进程只能处理 2GB 的内存,即使你有更多的可用内存.您可以在此处找到不同 Windows 版本的内存限制一>.
A regular 32-bit Windows process can only address 2GB of memory, even if you have more memory available. You can find the memory limits for different Windows versions here.
由于 VM 需要的内存不仅仅是堆,因此最大堆大小将略小于进程可用的最大内存.通常,对于 32 位 Windows 虚拟机,您可以将堆调整到大约 1.6GB.
Since the VM need memory for more things than just the heap, the max heap size will be slightly less than the maxmimum memory available to the process. Usually, you can tweak the heap up to around 1.6GB for a 32-bit Windows VM.
这篇关于32 位操作系统上的 JVM 堆大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!