1 Jul 2009 01:24
Re: [SciPy-dev] Memory usage of scipy.io.loadmat
Ariel Rokem <arokem <at> berkeley.edu>
2009-06-30 23:24:57 GMT
2009-06-30 23:24:57 GMT
Yes - that does seem to free up the memory.
While running this:
In [11]: for i in range(10):
a = sio.loadmat('/Users/arokem/Projects/SchizoSpread/Scans/SMR033109_MC/Gray/Original/TSeries/Scan1/tSeries1.mat')
causes a memory error, running this:
In [14]: for i in range(10):
a = sio.loadmat('/Users/arokem/Projects/SchizoSpread/Scans/SMR033109_MC/Gray/Original/TSeries/Scan1/tSeries1.mat')
gc.collect()
seems like it could go on forever (looking at the memory usage on a memory monitor, it just goes up and down to the same point, without net accumulation).
Thanks a lot!
Ariel
On Tue, Jun 30, 2009 at 3:33 PM, Xavier Saint-Mleux <saintmlx <at> apstat.com> wrote:
It is probably just the garbage collector being invoked. If you invoke
>
> So - just invoking an error in the ipython command line has freed up
> 300 MB. Where did they come from? I tried different things - assigning
> other variables doesn't seem to free up this memory. Neither do calls
> to other functions. Except "plot()", which does seem to do the trick
> for some reason. Interestingly, when I run all this in a python
> interactive session (and not ipython), I get a similar memory usage
> initially. Calling a non-existent variable does not free up the
> memory, but other things do. For example, import matplotlib.pylab into
> the namespace did the trick. Does anyone have any idea what is going on?
>
it manually, does it always free memory? e.g.:
import gc
gc.collect()
Xavier Saint-Mleux
_______________________________________________
Scipy-dev mailing list
Scipy-dev <at> scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev
--
Ariel Rokem
Helen Wills Neuroscience Institute
University of California, Berkeley
http://argentum.ucbso.berkeley.edu/ariel
_______________________________________________ SciPy-user mailing list SciPy-user <at> scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
RSS Feed