for i in range(100): reset(); import mpmath, gc;# gc.collect() mpmath.dps=200; ii=mpmath.zetazero(2000) print get_memory_usage()
See the printed value increase every 2 or 3 iterations. On Thursday, 24 November 2011 16:18:08 UTC+8, Jean-Pierre Flori wrote: > > On 23 nov, 19:12, Dima Pasechnik <dim...@gmail.com> wrote: > > consider the following Sage code: > > > > while True: > > reset() > > # do some time– and memory-consuming stuff (using mpmath) > > > > When it is run, we witness at each iteration the amount of memory > growing, > > until, after 10 hours or so, it takes 3Gb of RAM > > and triggers an OOM kernel event... > > > > Is it a memory leak? > > How one does debug this? > If you're creating many differentobjects, it could also be related to > Sage caching too much stuff in its coercion model and finally eating > all the memory. > See trac #715 and tickets mentioned therein. > Not sure how this stuff is affected by "reset()". > Could you provide a minimal and explicit example ? > > > > Thanks, > > Dima > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org