Re: Python memory usage



(hello group)

On Nov 9, 8:38 pm, "Klaas" <mike.kl...@xxxxxxxxx> wrote:

I was referring specifically to abominations like range(1000000)

However, there are plenty of valid reasons to allocate huge lists of
integers. This issue has been worked on:
http://evanjones.ca/python-memory.html
http://evanjones.ca/python-memory-part3.html

My understanding is that the patch allows most objects to be released
back to the OS, but can't help the problem for integers. I could be
mistaken. But on a clean Python 2.5:

x=range(10000000)
x=None

The problem exists for floats too, so for a less contrived example:

x=[random.weibullvariate(7.0,2.0) for i in xrange(10000000)]
x=None

Both leave the Python process bloated in my environment. Is this
problem a good candidate for the FAQ?

--Joseph

.



Relevant Pages

  • Re: Conflicting info between the global Security Bulletin and some SPi Security Bulletin
    ... Two examples in a W2K4 system (with R1V2). ... The MS02-050 is explicitly listed as included in SP4 AND in Rollup 1 ... What happen if one runs an unnecessary patch? ... of those lists, are in a better shape than those lists. ...
    (microsoft.public.win2000.security)
  • Re: PAWS security vulnerability
    ... but I am not a FreeBSD source contributor. ... Yes, I was shown this "vulnerability" by our network security person, ... patch, verify that I couldn't break it any longer. ... >you to post the patch and info to the appropriate FreeBSD security lists, ...
    (freebsd-questions)
  • Re: PAWS security vulnerability
    ... >FreeBSD security list" isn't grammatically correct. ... >"I told you to post the patch and info to the appropriate FreeBSD security ... >lists, and you aren't the least bit interested in doing what I told you" ...
    (freebsd-questions)
  • [PATCH 2.6.9-rc2-mm1 0/2] mm: memory policy for page cache allocation
    ... This is the first working release of this patch. ... we can specify a policy that does round robin ... when you get a call to allocate a page cache page in "page_cache_alloc", ... It may be this is not needed with the current mempolicy code if we can ...
    (Linux-Kernel)
  • Re: [PATCH] Compound page overhaul
    ... > The attached patch overhauls compound page handling. ... a small danger some others may allocate higher-order pages and then ... treat each piece as a separate entity. ...
    (Linux-Kernel)