On Thursday, October 20, 2016 at 8:42:05 AM UTC+2, vdelecroix wrote:
> It might not be a leak. *After* the loop the memory should be back to 
> normal. The very same as with 
> 
> sage: a = range(10**8)  # takes a lot of memory 
> sage: del a                    # free the memory 

Ok, so now, I understand why it takes the memory: a list was created.

My previous example can now be simplified to:

sage: %%cython
....: def f(int N):
....:     L = range(N)
....:     del L
....: 
sage: f(10**8)     # computation takes 40% of memory, 30% is not freed 
after computation

Thanks to Volker, I can confirm that everything is ok after the garbage 
collector has done its job:

sage: import gc
sage: gc.collect()   # the 30% of occupied memory gets freed
7

Thank you!

Sébastien

-- 
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.

Reply via email to