[sage-support] Re: Potential memory leak when calling binomial

2009-07-26 Thread Stephen Hartke
On Sun, Jul 26, 2009 at 12:31 AM, Carlo Hamalainen < carlo.hamalai...@gmail.com> wrote: > On Sat, Jul 25, 2009 at 5:08 PM, Stephen Hartke wrote: > > Might this be related to how binomial is evaluated using GiNaC? > > Valgrind says yes: > > ==26568== 4 bytes in 1 blocks are definitely lost in loss

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Carlo Hamalainen
On Sat, Jul 25, 2009 at 5:08 PM, Stephen Hartke wrote: > Might this be related to how binomial is evaluated using GiNaC?  Similar > problems occur when replacing binomial with log. Valgrind says yes: ==26568== 4 bytes in 1 blocks are definitely lost in loss record 35 of 3,312 ==26568==at 0x

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Stephen Hartke
On Sat, Jul 25, 2009 at 6:04 PM, Justin C. Walker wrote: > > I noticed that in the notebook, the code does create a problem, > ^ not?? > > but random values do. > Yes, I missed a "not". > Yup. I now see what you see: memory usage increases after

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Justin C. Walker
On Jul 25, 2009, at 15:08 , Stephen Hartke wrote: > On Sat, Jul 25, 2009 at 1:54 PM, Justin C. Walker > wrote: > >> I just tried this on 4.0.2 and 4.1 (on Mac OS X, 10.5.7), and got the >> same values before and after the loop, so something else must be >> involved. >> > > Justin, > > Thanks

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Stephen Hartke
On Sat, Jul 25, 2009 at 1:54 PM, Justin C. Walker wrote: > I just tried this on 4.0.2 and 4.1 (on Mac OS X, 10.5.7), and got the > same values before and after the loop, so something else must be > involved. > Justin, Thanks for your response! Did you run it from the command line or the notebo

[sage-support] Re: Potential memory leak when calling binomial

2009-07-25 Thread Justin C. Walker
On Jul 25, 2009, at 08:08 , Stephen Hartke wrote: > The following code ends up using a lot of memory: > > print get_memory_usage() > for i in range(10): >b=binomial(5,2) > print get_memory_usage() > > Output: > 133.48828125 > 135.015625 I just tried this on 4.0.2 and 4.1 (on Mac OS X, 1