1 copy for the function call 1 copy for the return from str_replace
On 10/21/05, Lonnie Olson fungus@aros.net wrote:
Does anyone have a clue why this particular statement would create 2 more copies of the message body in memory?
function iil_C_Append(&$conn, $folder, $message){ if (!$folder) return false; $fp = $conn->fp; dbg_memory(); $message = str_replace("\r", "", $message); dbg_memory();
results with a 2.5M message Oct 21 15:44:39 /home/f/fungus/public_html/mail/program/lib/imap.inc [1886]: E_USER_NOTICE: Memory used: 12796160 Oct 21 15:44:39 /home/f/fungus/public_html/mail/program/lib/imap.inc [1888]: E_USER_NOTICE: Memory used: 18044080
This is the block in the Iloha library that is creating the two extra copies in memory. Perhaps it is a PHP bug?
--lonnie
-- Christopher A. Watford christopher.watford@gmail.com http://dorm.tunkeymicket.com http://www.theroadtrip2005.com