Python IMAP4 Memory Error

Dody Suria Wijaya dodysw at gmail.com
Fri Dec 23 18:03:35 CET 2005


like magic it did the trick :D

This should be applied to future Python release. Thanks.

Fredrik Lundh wrote:
> Jean-Paul Calderone wrote:
> if you look at the debug output (which you may already have done),
> it's an obvious case of fragmentation-inducing behaviour.  any malloc-
> based system may choke on the sequence
> 
>     for a large number of attempts:
>         allocate a 15 megabyte block
>         shrink block to a couple of kilobytes
>         occasionally allocate a medium-sized block
> 
> from what I can tell, replacing the
> 
>             data = self.sslobj.read(size-read)
> 
> line with
> 
>             data = self.sslobj.read(min(size-read, 16384))
> 
> should do the trick.




More information about the Python-list mailing list