Re: [pypy-dev] memory leak in pypy

2013-07-30 Thread Nathan Hurst
Ok, I tracked it down. For some reason pydev (eclipse) was randomly choosing between pypy and python2.7 on each run (I discovered this when watching what was happening in top). This explains why it was so flakey. Sorry for the confusion. I have no idea how I'm going to debug this further. (OT:

Re: [pypy-dev] memory leak in pypy

2013-07-30 Thread Armin Rigo
Hi Vasily, On Tue, Jul 30, 2013 at 2:02 PM, Vasily Evseenko wrote: > It seems to be range / xrange issue. > range allocates all data in a moment when xrange acts like an iterator. Not in PyPy. Armin ___ pypy-dev mailing list pypy-dev@python.org http:

Re: [pypy-dev] memory leak in pypy

2013-07-30 Thread Vasily Evseenko
Hi, It seems to be range / xrange issue. range allocates all data in a moment when xrange acts like an iterator. On 07/30/2013 01:01 PM, Maciej Fijalkowski wrote: > This sounds odd. My PyPy does not leak memory in this example. Can you > please double check? > > On Tue, Jul 30, 2013 at 2:43 AM, Na

Re: [pypy-dev] memory leak in pypy

2013-07-30 Thread Maciej Fijalkowski
This sounds odd. My PyPy does not leak memory in this example. Can you please double check? On Tue, Jul 30, 2013 at 2:43 AM, Nathan Hurst wrote: > I was playing with this simple function to compute uint/3. It does > not (afaict) directly allocate any memory, but when run it rapidly > consumes al

[pypy-dev] memory leak in pypy

2013-07-29 Thread Nathan Hurst
I was playing with this simple function to compute uint/3. It does not (afaict) directly allocate any memory, but when run it rapidly consumes all memory (32GB): def divu3(n): q = (n >> 2) + (n >> 4) # q = n*0.0101 (approx). q = q + (q >> 4) # q = n*0.01010101. q = q + (q >> 8) # q