[issue3063] memory leak in random number generation

Grant Tang report at bugs.python.org
Sun Jun 8 18:55:46 CEST 2008


Grant Tang <grant.tang at gmail.com> added the comment:

Here I am confused. 100million floats in a list takes about 800M byte 
memory. This is acceptable. 

for i in xrange(100000000):
    data[i] = random()

so it should be 800M plus a float returned by random(). But the problem 
is after this loop, except 800M bytes list, another >2G memory is 
occupied. And delete data list and call gc.collect() does not release 
these memory. I think you mean there are lots of floats used in random
() call, they should be released after random() returned.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3063>
_______________________________________


More information about the Python-bugs-list mailing list