Re: [sage-devel] Re: Memory leak in poset dimension()

2018-12-02 Thread Jori Mäntysalo

On Sun, 2 Dec 2018, Dima Pasechnik wrote:


do you still see it with https://trac.sagemath.org/ticket/26795 ?


Yes, it is still there.

--
Jori Mäntysalo

[sage-devel] Analyzing [pc]ython code for memory leaks

2018-12-02 Thread Jori Mäntysalo

What tools are available for static code analysis in Python/Cython?

For example for every bitset_init(SOMETHING, ...) there must be a 
bitset_free(SOMETHING). A tool could check the code assuming that every 
expression in if-clause is either true or false, and look if there is a 
path where the function ends without bitset_free. I suppose that someone 
has already done something like that.


--
Jori Mäntysalo


[sage-devel] Re: Memory leak in poset dimension()

2018-12-02 Thread Dima Pasechnik
do you still see it with https://trac.sagemath.org/ticket/26795 ?

On Saturday, December 1, 2018 at 7:11:00 PM UTC, Jori Mäntysalo wrote:
>
> This shows a leak: 
>
> i = 0 
> for P in Posets(8): 
>  if i % 1000 == 0: 
>  gc.collect() 
>  print get_memory_usage() 
>  i += 1 
>  _ = P.dimension() 
>
> To compare, width() and height() does not seem to leak. 
>
> -- 
> Jori Mäntysalo 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.