New submission from Grant Tang <[EMAIL PROTECTED]>: #the following code consume about 800M memory, which is normal n = 100000000 data = [0.0 for i in xrange(n)]
#however, if I assign random number to data list, it will consume extra 2.5G memory. from random import random for s in xrange(n): data[i] = random() #even if I delete data, only 800M memory released del data #call gc.collect() does not help, the extra 2.5G memory not released import gc gc.collect() only when I quit Python, the memory is released. Same effect if I use random number generator from numpy. Same effect even if I just say data[i] = atpof("1.26") I tried it in both Python 2.4 and 2.5 on linux 64bit and 32bit. ---------- components: None messages: 67833 nosy: gtang severity: normal status: open title: memory leak in random number generation type: resource usage versions: Python 2.4, Python 2.5 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3063> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com