I am using ‘mem.limits’ to restrict the memory limit of an R process. E.g:
mem.limits(500000, 20000000)
gc() #see limits
x <- rnorm(1e8); #should fail
This still works fine, however since R 2.14 there is a warning message:
Warning message: ‘mem.limits’ is deprecated. Use ‘gc’ instead. See
help(“Deprecated”)
Now I am not sure what to do with this. How is the garbage collection related to setting a memory limit?
In R 2.14.x they are deprecated but still functional:
In R-devel all limits are defunct. The functionality has been removed with no replacement. See NEWS for R 2.14.0 and PR#14795 for details.