EVOLUTION-MANAGER
Edit File: memory.size.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Report on Memory Allocation (on Windows)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for memory.size {utils}"><tr><td>memory.size {utils}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Report on Memory Allocation (on Windows)</h2> <h3>Description</h3> <dl> <dt>On MS Windows,</dt><dd> <p><code>memory.size()</code> reports the current or maximum memory allocation of the <code>malloc</code> function used in this version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. </p> <p><code>memory.limit()</code> reports or increases the limit in force on the total allocation.</p> </dd> <dt>On non-Windows platforms</dt><dd><p>these are stubs which report infinity (<code><a href="../../base/html/is.finite.html">Inf</a></code>) with a warning.</p> </dd> </dl> <h3>Usage</h3> <pre> memory.size(max = FALSE) memory.limit(size = NA) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>max</code></td> <td> <p>logical. If <code>TRUE</code> the maximum amount of memory obtained from the OS is reported, if <code>FALSE</code> the amount currently in use, if <code>NA</code> the memory limit.</p> </td></tr> <tr valign="top"><td><code>size</code></td> <td> <p>numeric. If <code>NA</code> report the memory limit, otherwise request a new limit, in Mb. Only values of up to 4095 are allowed on 32-bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> builds, but see ‘Details’.</p> </td></tr> </table> <h3>Details</h3> <p>Command-line flag <span class="option">--max-mem-size</span> sets the maximum value of obtainable memory (including a very small amount of housekeeping overhead). This cannot exceed 3Gb on 32-bit Windows, and most versions are limited to 2Gb. The minimum is currently 32Mb. </p> <p>If 32-bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is run on most 64-bit versions of Windows the maximum value of obtainable memory is just under 4Gb. For a 64-bit versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> under 64-bit Windows the limit is currently 8Tb. </p> <p>Memory limits can only be increased. </p> <p>Environment variable <span class="env">R_MAX_MEM_SIZE</span> provides another way to specify the initial limit. </p> <h3>Value</h3> <p>A number: On Windows, size in Mb (1048576 bytes), rounded to 0.01 Mb for <code>memory.size</code> and rounded down for <code>memory.limit</code>. <br /> On other platforms: <code><a href="../../base/html/is.finite.html">Inf</a></code> always. </p> <h3>Note</h3> <p>These functions exist on all platforms, but on non-Windows always report infinity as <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> does itself provide limits on memory allocation—the OS's own facilities can be used. </p> <h3>See Also</h3> <p><a href="../../base/html/Memory-limits.html">Memory-limits</a> for other limits. </p> <p>On Windows: The rw-FAQ for more details and references. </p> <h3>Examples</h3> <pre> if(.Platform$OS.type == "windows") withAutoprint({ memory.size() memory.size(TRUE) memory.limit() }) </pre> <hr /><div style="text-align: center;">[Package <em>utils</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>