Tim Peters added the comment:

haypo, there would only be a million ints here even if the loop had completed.  
That's trivial in context (maybe 14 MB for the free list in Python 2?).  And 
note that I did my example run under Python 3.

Besides, the OP and I both reported that Task Manager showed that Python did 
release "almost all" of the memory back to the OS.  While the first MemoryError 
occurs when available memory has been truly exhausted, the second MemoryError 
occurs with way over a gigabyte of memory still "free" (according to Task 
Manager).  Best guess is that it is indeed free, but so fragmented that MS C's 
allocator can't deal with it.  That would not be unprecedented on Windows ;-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to