Python IMAP4 Memory Error

Jean-Paul Calderone exarkun at divmod.com
Fri Dec 23 04:18:22 EST 2005


On Fri, 23 Dec 2005 14:21:27 +1100, Dody Suria Wijaya <dodysw at gmail.com> wrote:
>Noah wrote:
>> This looks like a bug in your build of Python 2.4.2 for Windows.
>> Basically it means that C's malloc() function in the Python interpreter
>> failed.
>>
>
>On a second trial, it's also failed on Python 2.3.5 for Windows, Python
>2.3.3 for Windows, and Python 2.2.3 for Windows. So this seems to me as
>a Windows system related bug, not a particular version of Python bug.

Arguably, it's a bug in Python's imaplib module.  Sure, the Windows memory allocator is feeble and falls over when asked to do perfectly reasonable things.  But Python runs on Windows, so Python should do what it takes to work on Windows (or mark imaplib UNIX-only).

This particular issue can be avoided most of the time by reading in smaller chunks.

You might also address it as a deployment issue, and run fewer programs on the host in question, or reboot it more frequently.

Jean-Paul



More information about the Python-list mailing list