#40950 [Opn->Bgs]: bzread() reads only 8192 bytes but uses memory for full $length
| From: | iliaa@php.net | Date: | Mon, 02 Apr 2007 21:14:37 +0000 |
| Subject: | #40950 [Opn->Bgs]: bzread() reads only 8192 bytes but uses memory for full $length | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111028@lists.php.net to get a copy of this message | ||
ID: 40950
Updated by: iliaa@php.net
Reported By: phpbugs at sebastianmendel dot de
-Status: Open
+Status: Bogus
Bug Type: Bzip2 Related
Operating System: Windows
PHP Version: 5.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is because the memory is pre-allocated before the bz2 file is
read.
Previous Comments:
------------------------------------------------------------------------
[2007-03-29 16:21:57] phpbugs at sebastianmendel dot de
Description:
------------
bzread() does only read 8192 bytes from file handle but consumes memory
in the size of $length
Reproduce code:
---------------
<?php
echo memory_get_peak_usage(true);
$read_data = bzread(bzopen('file.bz2'), 10000000)
echo strlen($read_data);
echo memory_get_peak_usage(true);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40950&edit=1