on Linux and Windows I call

options( java.parameters="-Xmx512m" )

before loading any R libraries which rely on rJava. Especially when reading and writing large Excel files using XLConnect (which uses Apache POI) this becomes necessary. However, on my Mac (OSX 10.8) this seams to have no effect:

options( java.parameters="-Xmx512M" )
library("XLConnect")
> Loading required packages: XLConnectJars
> Loading required packages: rJava
> XLConnect 0.2-1 by Mirai Solutions GmbH
> http://www.mirai-solutions.com ,
> http://miraisolutions.wordpress.com
xlcMemoryReport()
> Amount of free memory in the Java Virtual Machine (JVM):  60.72328 MB

My Java version is:

java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

Any hints what I could have missed?

有帮助吗?

解决方案

Do you actually get OutOfMemory errors?

The heap may not grow to its max size until it needs to, so the "free memory" reported will just be the memory available within the current allocation (which may be allowed to be extended if necessary until that maximum is finally reached).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top