On Sun, Sep 17, 2017 at 12:39 AM, Juan Telleria <jteller...@gmail.com> wrote: > Dear R Developers, > > In the same way that MySQL/MariaDB's Engine InnoDB or MyISAM/Aria have the > innodb_buffer_pool_size or the key_buffer_size for setting the maximum > amount of RAM which can be used by a Server Instance.
Memory is not controlled by R itself because packages may malloc() directly. However most operating systems have features to limit resources of a given process. The CRAN package 'unix' has wrappers for posix setrlimit [1] e.g. unix::rlimit_as() limits address space. This works pretty well, however I found that the way memory is managed and counted varies a lot per OS and malloc implementation. You can also set rlimits on a single evaluation via the rlimit parameter in sys::eval_safe(). [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/getrlimit.html ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel