This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gtang
Recipients facundobatista, gtang, tim.peters
Date 2008-06-08.17:13:51
SpamBayes Score 0.0044988254
Marked as misclassified No
Message-id <ef7af6690806081013t345341bcv7452a81b0605baf@mail.gmail.com>
In-reply-to <1212944366.37.0.361157719462.issue3063@psf.upfronthosting.co.za>
Content
Facundo:

I understand now. You mean every unique float number used will be an object
in memory. And never been released until Python quit. Is there any way to
reclaim these memory? We need 3G memory to create a list of 100million
randum numbers.

Thank you very much,
Grant

On Sun, Jun 8, 2008 at 11:59 AM, Facundo Batista <report@bugs.python.org>
wrote:

>
> Facundo Batista <facundo@taniquetil.com.ar> added the comment:
>
> So, 0.0 would be cached, and the 414m+384m would be from the list
> itself, right? I tried,
>
> >>> data = [(1.0/i) for i in xrange(1,100000000)]
>
> And the memory consumption was the big one.
>
> Grant, the 800 MB is taken by ONE 0.0, and a list of zillion positions.
>
> Furthermore, I did:
>
> >>> for x in xrange(100000000):
> ...     i = random()
>
> And the memory didn't increase.
>
> Grant, take note that there's no gc issue, the numbers stay alive
> because the list itself is pointing to them.
>
> Closing this as invalid.
>
> ----------
> resolution:  -> invalid
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue3063>
> _______________________________________
>
Files
File name Uploaded
unnamed gtang, 2008-06-08.17:13:51
History
Date User Action Args
2008-06-08 17:13:52gtangsetspambayes_score: 0.00449883 -> 0.0044988254
recipients: + gtang, tim.peters, facundobatista
2008-06-08 17:13:52gtanglinkissue3063 messages
2008-06-08 17:13:52gtangcreate