SmartSVN 提示 ran out of memory的解决方案

最近有个SVN的项目体积比较大,在SmartSVN里打开的文件进行枚举的时候,经常会提示“ ran out of memory”的错误,

根据提示,可以修改其配置。例如在Mac osx下


-Xmx256m改为-Xmx512m 或者更大的值即可,如果你是其他平台可以参考官方的文档进行修改


Memory Limit

The memory limit (also known as maximum heap size) specifies how much RAM the SmartSVN process is allowed to use. If the set value is too low, SmartSVN may run out of memory during memory-intensive operations. To avoid this, we recommend adjusting your maximum heap size to 3GB when adding or committing a large number of files to a repository. How the memory limit is set depends on your operating system:

  • Windows (all users) In the file bin/smartsvn.vmoptions inside the SmartSVN installation directory, there is a line that looks like this: -Xmx256m. This sets a memory limit of 256 MB. To set a memory limit of 512 MB, change this to -Xmx512m.
  • Windows (current user) The memory limit specified in bin/smartsvn.vmoptions can be overridden on a per-user basis. To do so, create a file named vmoptions in the directory syntevo\SmartSVN inside the application data directory. The location of the latter is usually either C:\Documents and Settings\[Username]\Application Data (for Windows 2000/XP) or C:\Users\[Username]\AppData (for Windows Vista/7). In the newly created vmoptions file, insert a line that specifies the memory limit, e.g. -Xmx512m for a memory limit of 512 MB.
  • Mac OS X Right click on the SmartSVN folder and select “Show Package Contents”. Go into the Contents folder and open info.plist. Edit the line -Xmx256m. The memory is given in MB. E.g. To set a memory limit of 512 MB, change this to -Xmx512m.
  • Linux Set the environment variable SMARTSVN_MAX_HEAP_SIZE to the desired value, e.g. 512m for a memory limit of 512 MB. One way to set this variable for all users is opening the file /etc/profile with root priviledges and adding the following line at the end (after unmask xxx): export SMARTSVN_MAX_HEAP_SIZE=512m.