Chris January wrote:

> It appears to fail on x86_64 platforms, but not on i686. I am guessing PHP
> uses more memory on x86_64 and that pushes it over the limit.

> [16-Nov-2009 10:12:37 +0000]: Mem after preg_split: 20530140
> [16-Nov-2009 10:12:37 +0000]: Items in result: 163517

Was 20MB, with x86_64 you have more than 32 MB. Maybe this should be 
requested as PHP bug to PHP's bugtracker? In the mean time you can try 
replace line:

return preg_split('/\s+/', $data, -1, PREG_SPLIT_NO_EMPTY);

with:

return array_values(array_filter(explode(' ', $data)));

or with:

$res = array();
$tok = strtok($data, ' ');
while ($tok !== false) {
     $res[] = $tok;
     $tok = strtok(' ');
}
return $res;

Check memory for each, please.

-- 
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Project Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/dev/

Reply via email to