Re: Re: [PATCH] imap_savebody()
| From: | Ilia Alshanetsky | Date: | Thu, 22 Sep 2005 16:30:32 +0000 |
| Subject: | Re: Re: [PATCH] imap_savebody() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19131@lists.php.net to get a copy of this message | ||
Sara Golemon wrote:
>>#define GETS_FETCH_SIZE 2048000
>>
>
> That size doesn't seem a bit excessive to you? I thought the whole point of
> dumping it to a file was to avoid huge memory chunks. Not to mention the
> fact that reserving 2MB of stack space makes me a little twitchy...
Indeed, 2 megs of stack space seems a bit much, not to mention
completely bypassed PHP's memory limit. I'd recommend allocating 1
megabyte buffer via emalloc(), a bit slower, but much "nicer" IMHO.
Ilia