我正在尝试分配 Netbeans
超过 1 GB RAM 的 jvm,但没有成功。我有一个非常庞大的 maven 项目要处理,并且 netbeans 在所有项目打开后立即内存不足。
我在 Gentoo 上工作 linux
:
Linux myHost 3.2.12-gentoo #3 SMP Mon Jul 2 14:27:56 CEST 2012 i686
Intel(R) Xeon(R) CPU E31245 @ 3.30GHz GenuineIntel GNU/Linux
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 129570
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 129570
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
我的盒子的记忆是:
# cat /proc/meminfo
MemTotal: 16585504 kB
MemFree: 11731232 kB
...
当我设置时, -J-Xmx3024m
我会收到这些消息:
/opt/netbeans-7.2/bin/netbeans
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
谢谢!