[SciPy-user] RE : Re: RE : Re: How to free unused memory by Python

Robert VERGNES robert.vergnes@yahoo...
Mon Aug 27 08:59:13 CDT 2007


something like lists not being carbage collected ? strange...


Gael Varoquaux <gael.varoquaux@normalesup.org> a écrit : Could it be due to some stored variable. In the Python interpretor "_" is
the last answer, so the last answer does not get garbage collected. There
might be other "jokes" lying around.

HTH,

Gaël

On Mon, Aug 27, 2007 at 03:17:30PM +0200, Robert VERGNES wrote:
>    unfortunately not...

>    Stefan van der Walt  a ecrit :

>      On Mon, Aug 27, 2007 at 09:32:12AM +0200, Robert VERGNES wrote:
>      > Hello,

>      > This is not a scipy issue - albeit I do use scipy for my app- and that
>      array()
>      > creation seems to crash once I reached my upper Physical Memory limit.

>      > The question is general, How to free unused memory by Python:

>      > Te following small test demonstrates the issue:

>      > Before starting the test my UsedPhysicalMemory(PF): 555Mb

>      > >>>tf=range(0,10000000) PF: 710Mb ( so 155Mb for my List)
>      > >>> tf=[0,1,2,3,4,5] PF: 672Mb (Why? Why the remaining 117Mb is not
>      > freed?)
>      > >>> del tf PF: 672Mb ( Nothing happens)

>      Does it help if you manually run garbage collection?

>      import gc
>      gc.collect()

_______________________________________________
SciPy-user mailing list
SciPy-user@scipy.org
http://projects.scipy.org/mailman/listinfo/scipy-user


       
---------------------------------
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070827/0c215ec9/attachment.html 


More information about the SciPy-user mailing list