Charles-François Natali <neolo...@free.fr> added the comment:

It's actually an obvious case of heap fragmentation due to long-lived chunks 
being realloc()ed to a smaller size. Some malloc implementations can choke on 
this (e.g. OS-X's malloc is known to not shrink blocks when realloc() is called 
with a smaller size).
The solution is simply to use a StringIO to avoid holding references to those 
blocks for too long.
Patch attached.

----------
Added file: http://bugs.python.org/file22044/imaplib_read.diff

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

Reply via email to