How to increase the memory allocation after R version 4.2

Hi Rstudio Community,

I am asking a question regarding the removal of a function "memory.limit()" in base-r.

After R version 4.2.0, this function is no longer supported.
(See this link for more info:[Rd] R 4.2.0 is released (ethz.ch))

Does this mean we cannot increase the memory allocation anymore? Or does this mean after this version, R can increase the memory allocation automatically so that we need not worry about this? Since this version is relatively new, I could not find the solution for this issue.
Also, I would like to know if there is a package that does the same job as memory.limit().

I am looking forward to your reponse.

You don't need to worry, R will access all available memory and not limit itself.

1 Like

Thank you for your response. Does the same thing apply to Version 4.1.1? Or is this totally new that before 4.2.0 we have to allocate memory manually before 4.2.0?

as of R version 3:

It is now possible for 64-bit builds to allocate amounts of
memory limited only by the OS. It may be wise to use OS
facilities (e.g., ulimit in a bash shell, limit in csh), to set
limits on overall memory consumption of an R process,
particularly in a multi-user environment. A number of packages
need a limit of at least 4GB of virtual memory to load.
64-bit Windows builds of R are by default limited in memory usage
to the amount of RAM installed: this limit can be changed by
command-line option --max-mem-size or setting environment
variable R_MAX_MEM_SIZE.

Thank you for your response.

By your response, it seems as that R_MAX_MEM_SIZE will solve this problem. Daily News: R-devel says R_MAX_MEM_SIZE is defunct in r-devel for Version 4.1.1.. I assume that we should use R_MAX_MEM_SIZE for R Version 4.1.1. I think this problem is solved. Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.