On Monday, December 18, 2017 at 7:48:34 AM UTC-8, Marco Caselli wrote: > > > So there is a discrepancy between the real amount of memory in use and the > one allocated but, when I run a process, my hardware limits the allocated > one. So, for instance, I can evaluate ex_f(p) just for very small values of > p even if the real amount of memory in use is almost zero for any p. > > No, not if there's no memory leak. Memory that is freed by python is available for re-use by python. That's actually the reason for python to not immediately return freed memory to the operating system: reusing it for new python objects is considerably faster.
If your routine f_ex runs out of memory then that would indicate a memory leak. If you look at the code for (K^6).__iter__ you'll see it really intends to be an iterator that uses limited memory. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.