suspected cPickle memory leak

Al Franz franz2 at llnl.gov
Thu May 12 20:10:02 EDT 2005


     I believe there is a memory leak in cPickle.  I am using python2.2.  I 
have a parallel code which uses array() and indices() from Numeric to 
massage data buffers before being sent and received by Pypar.  Pypar 
subsequently uses cPickle to pickle the data.  After many hours of 
execution, my code crashes with one of the following error messages 
(depending upon the run):

     a = zeros(shape, typecode, savespace)
MemoryError:  can't allocate memory for array

or:

     s = dumps(x, 1)
MemoryError:  out of memory

I have since modified my code to use a different data format so cPickle is 
no longer used from PyPar and now the code runs fine.

     -- Al Franz
     Computer Scientist
     Lawrence Livermore National Laboratory 





More information about the Python-list mailing list