This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients brian.curtin, pitrou, r.david.murray, tim.golden, tim.peters, vstinner, Пётр.Дёмин
Date 2013-10-13.22:22:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381702978.81.0.485125683292.issue19246@psf.upfronthosting.co.za>
In-reply-to
Content
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 ;-)
History
Date User Action Args
2013-10-13 22:22:58tim.peterssetrecipients: + tim.peters, pitrou, vstinner, tim.golden, r.david.murray, brian.curtin, Пётр.Дёмин
2013-10-13 22:22:58tim.peterssetmessageid: <1381702978.81.0.485125683292.issue19246@psf.upfronthosting.co.za>
2013-10-13 22:22:58tim.peterslinkissue19246 messages
2013-10-13 22:22:58tim.peterscreate