Re: [sage-devel] continued_fraction seems to leak memory

2020-07-23 Thread Nils Bruin
On Thursday, July 23, 2020 at 2:39:09 PM UTC-7, Spencer Dembner wrote: > > It may be related, but I don't think it's exactly the same issue. For > example, the following, involving no square root, still leaks memory: > > for i in [1,..,2]: > if i%100 == 0: > print(i); > pri

Re: [sage-devel] continued_fraction seems to leak memory

2020-07-23 Thread Nils Bruin
On Thursday, July 23, 2020 at 3:30:48 PM UTC-7, Dave Morris wrote: > > I think this last example is related to trac #27536 > (conversion of mathematical > constant such as pi to RDF leaks memory). There is still a memory leak > (but smaller, I think) if

Re: [sage-devel] continued_fraction seems to leak memory

2020-07-23 Thread Dave Morris
I think this last example is related to trac #27536 (conversion of mathematical constant such as pi to RDF leaks memory). There is still a memory leak (but smaller, I think) if pi^i is replaced with pi, but I don't see a memory leak if pi^i is replaced

Re: [sage-devel] continued_fraction seems to leak memory

2020-07-23 Thread Spencer Dembner
It may be related, but I don't think it's exactly the same issue. For example, the following, involving no square root, still leaks memory: for i in [1,..,2]: if i%100 == 0: print(i); print(get_memory_usage()); C = continued_fraction(pi^i); C.denominator(100);

Re: [sage-devel] continued_fraction seems to leak memory

2020-07-23 Thread Dave Morris
Is this the issue that was reported in Trac #27185 (defect: sqrt memory leak)? On Thursday, July 23, 2020 at 3:12:07 PM UTC-6, Spencer Dembner wrote: > > Yup- what you wrote gives me the same result as far as climbing memory > usage. > > On Thursday, July

Re: [sage-devel] continued_fraction seems to leak memory

2020-07-23 Thread Spencer Dembner
Yup- what you wrote gives me the same result as far as climbing memory usage. On Thursday, July 23, 2020 at 4:07:23 PM UTC-5, vdelecroix wrote: > > Thanks for your report. > > Actually, it does not seem to have much to do with continued > fractions but rather with the symbolic ring > > sage[4]

Re: [sage-devel] continued_fraction seems to leak memory

2020-07-23 Thread Vincent Delecroix
Thanks for your report. Actually, it does not seem to have much to do with continued fractions but rather with the symbolic ring sage[4]: for i in [250,..,300]: ...: if i%1000 == 0: ...: print(i); ...: print(get_memory_usage()) ...: _ = RIF(sqrt(i)