title: When does R perform automatic garbage collection?
body: <p>See the following example, garbage collection info is enforced with <code>gcinfo(T)</code>:</p>
  
  <pre><code>gcinfo(T)
  set.seed(1)
  x &lt;- rnorm(1e7)
  y &lt;- rnorm(100)
  z &lt;- rnorm(1e6)
  a &lt;- x * z
  rm(a)
  </code></pre>
  
  <p>This is what I see:</p>
  
  <pre><code>&gt; gcinfo(T)
  [1] FALSE
  &gt; set.seed(1)
  &gt; x &lt;- rnorm(1e7)
  Garbage collection 4 = 2+0+2 (level 2) ... 
  11.6 Mbytes of cons cells used (47%)
  3.1 Mbytes of vectors used (3%)
  &gt; y &lt;- rnorm(100)
  &gt; z &lt;- rnorm(1e6)
  &gt; a &lt;- x * z
  Garbage collection 5 = 2+0+3 (level 2) ... 
  11.6 Mbytes of cons cells used (47%)
  87.0 Mbytes of vectors used (44%)
  &gt; rm(a)
  </code></pre>
  
  <p>We can see that gc is performed when <code>x</code> and <code>a</code> are created. My question is:
  When does R perform automatic gc, at fixed time intervals? at the end of session? after large object creation or rm?
  what is the size limit for such large object?</p>