Java Mailing List Archive

http://www.r-help.com/

Home » R Help for Statistical Computing »

Re: [R] how to free memory? (gc() doesn't work for me)

jim holtman

2010-09-04

Replies: Find Java Web Hosting

Author LoginPost Reply
Seems to work for me:

> x <- matrix(0,10000,10000)
> object.size(x)
800000112 bytes
> gc()
       used (Mb) gc trigger (Mb) max used (Mb)
Ncells   174104  4.7   741108 19.8   741108 19.8
Vcells 101761938 776.4 113632405 867.0 102762450 784.1
> rm(x)
> gc()
      used (Mb) gc trigger (Mb) max used (Mb)
Ncells 174202 4.7   741108 19.8   741108 19.8
Vcells 1761954 13.5  90905923 693.6 102762450 784.1


On Sat, Sep 4, 2010 at 12:46 AM, Hyunchul Kim
<hyunchul.kim.sfc@(protected):
> Hi, all
>
> I have a huge object that use almost all of available memory.
>
> R> rm(a_huge_object)
> R> gc()
>
> doesn't free memory and ?gc doesn't show anything.
>
> Are there any suggestion?
>
> Thanks in advance,
>
> Regards,
>
> Hyunchul
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@(protected)
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



--
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
©2008 r-help.com - Jax Systems, LLC, U.S.A.