R – memory management


  1. m1 <- 1:(10^9)
  2. m2 <- 1:(10^9) it exceeded the 12GB physical memory, then starting swapping, I terminated R process.
  3. restart R
  4. m1 <- 1:(10^8)
  5. m2 <- 1:(10^8)
  6. m3 <- 1:(10^9), then I did `remove(list=ls())` and it removed the object from the environment but the memory did not get released.
  7. gc() clear memory using garbage collection in R



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s