On 22/07/2011 13:20, Armin Rigo wrote: > Hi Berend, > > On Fri, Jul 22, 2011 at 12:42 PM, Berend De Schouwer > <berend.deschou...@ucs-software.co.za> wrote: >> The following program has constant (+- 10 MB) memory usage in CPython, >> but it quickly leaks massive amounts of memory in pypy. > In theory it's not a leak, because the memory is eventually freed. > You can see this by adding "import gc; gc.collect()" in the loop; then > the memory usage remains stable.
Confirmed. It's expensive, though, so I'm running it in a separate thread. The program in question can eat a few gigs in a few seconds, so I've got to run it every second. > It needs to be fixed, but I'm not sure exactly how to do it generally > (as opposed to just fixing array.array, which doesn't help all other > similar situations). I'd appreciate pointers to fixing array.array, if possible. gc.collect() every second still eats about 500 MB too much RAM. So I'm looking at 600 vs. 100 MB RAM. At least it's running. The contents of and attachments to this e-mail are intended for the addressee only, and may contain the confidential information of UCS Group and/or its subsidiaries. Any review, use or dissemination thereof by anyone other than the intended addressee is prohibited. If you are not the intended addressee please notify the writer immediately and destroy the e-mail. UCS Group Limited and its subsidiaries distance themselves from and accept no liability for unauthorised use of their e-mail facilities or e-mails sent other than strictly for business purposes. _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev