[issue3063] memory leak in random number generation

Facundo Batista report at bugs.python.org
Sun Jun 8 18:01:39 CEST 2008


Facundo Batista <facundo at taniquetil.com.ar> added the comment:

Confirmed the issue in the trunk right now:

(the number between square brackets point to the 'top' information below)

facundo at pomcat:~/devel/reps/python/trunk$ ./python 
Python 2.6a3+ (trunk:64009, Jun  7 2008, 09:51:56) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[1]
>>> data = [0.0 for i in xrange(100000000)]
[2]
>>> from random import random
>>> for i in xrange(100000000):
...     data[i] = random()
... 
>>> 
[3]


The memory consumption:

     PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND    
[1] 4054 facundo   20   0  5032 3264 1796 S  0.0  0.2   0:00.02 python
[2] 4054 facundo   20   0  414m 384m 1888 S  0.0 19.1   0:17.72 python
[3] 4054 facundo   20   0 1953m 1.4g 1952 S  0.0 70.7   1:01.40 python

----------
nosy: +facundobatista
versions: +Python 2.6 -Python 2.4, Python 2.5

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


More information about the Python-bugs-list mailing list