[R] Easy method to set user-mode virtual memory space in Windows Vista and 7
Kingsford Jones
kingsfordjones at gmail.com
Wed Oct 28 17:37:21 CET 2009
I thought I'd share this with the list since it appears to provide a
quick fix to some memory problems, and I haven't see it discussed in
relation to R.
To reallocate virtual memory from kernel-mode to user-mode in 32-bit
Vista or Windows 7 one can use the increaseuserva boot option value.
See
http://msdn.microsoft.com/en-us/library/aa906211.aspx
On my 4GB Vista machine, R is now able to use 3GB memory (previously
at the default value of 2GB).
Here's the method:
Open cmd.exe as administrator and type
BCDEdit /set IncreaseUserVA <value>
where <value> is between 2048 and 3072 (ie 2-3GB), then reboot. Given
that you've set the --max-mem-size flag, or used the memory.limit
function in an R session to increase R's memory allocation, your R
processes should now be allowed to access up to 3GB of virtual memory.
I am not a Windows expert, so if anyone knows of disadvantages of
using this method *please* post a response.
best,
Kingsford Jones
More information about the R-help
mailing list