Readyboost and JVM
I am using a memory stick with the Readyboost property.
Java does not recognize the extra memory from the stick (if I set the Xmx to a value that exceeds the RAM value from the computer in order to use the stick memory, I get error:
Error occurred during initialization of VM
Error: Could not create the Java Vir开发者_C百科tual Machine.
Could not reserve enough space for object heap
Error: A fatal exception has occurred. Program will exit.)
Could you please give me a solution? Thank you!
First, Readyboost is a disk-caching feature (for persistent storage etc) - it's not related to physically addressable RAM / virtual address space.
Second, the -Xmx Java setting only sets the max heap. The JVM needs to use more than this value in total, due to the perm gen space and VM libraries / overheads. See here for further details:
Java - Setting -Xmx etc
Also, depending on what OS you're using (I'm assuming Windows 32-bit?), you can't assign more than a specified amount of memory (often 2 GiB) to a single process. Most 64-bit operating systems don't suffer from this limitation.
精彩评论