Is pickle buggy?
jepler epler
jepler.lnk at lnk.ispi.net
Wed Jul 12 08:34:35 EDT 2000
On Tue, 11 Jul 2000 13:35:54 +0200, Thomas Thiele
<thiele at muc.das-werk.de> wrote:
>Hallo! I try it again, becouse it is important:
>
>Why does this programm (pickle) eats memory?
>Why does pickle (marshal in it) not freeing the whole memory?
>
>And not cPickle eats more memory!
Augmenting the test program with:
class X:
def __init__(self, s): self.s=s
I can also observe this behavior.
RedHat 6.2/python 1.5.2-13
I suspect, but haven't read the source well enough to know,
that this has to do with the interning of strings.
The following code will produce the memory leak without invoking pickle:
def uniquestring(): # the code to generate those unique 5-letter strings
while 1:
eval(`uniquestring()`)
If you think this sucks, you're probably right.
Jeff
More information about the Python-list
mailing list