#37577 [Opn->Bgs]: Much Memory Usage while copy big files
| From: | iliaa@php.net | Date: | Wed, 24 May 2006 23:15:43 +0000 |
| Subject: | #37577 [Opn->Bgs]: Much Memory Usage while copy big files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97570@lists.php.net to get a copy of this message | ||
ID: 37577
Updated by: iliaa@php.net
Reported By: petrich at tronic-media dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Linux + Windows
PHP Version: 5.1.4
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
For faster copies php uses mmap() which maps the file to
memory.
Previous Comments:
------------------------------------------------------------------------
[2006-05-24 11:45:22] petrich at tronic-media dot com
Description:
------------
Not sure if it's a "bug or a feature",
but when copying a 70MB file via PHP's copy() function,
the php process will use nearly the same Memory.
I found a (closed) Bug Report (#29922) relatet to this Issue
(http://bugs.php.net/bug.php?id=29922),
it seems to be fixed long time ago, but in PHP 5.1.4 it is not.
Testet with PHP 5.1.4 (on Win-XP and Linux) as Apache2 Module. (All
extentins disabled + default php.ini-dist settings)
This Bug/Feature does'nt occur in php 4.3.3 (Win-XP as Apache2
Module).
Reproduce code:
---------------
<?php
copy('70MB.data','70MB.data.copy');
/* now look at the (linux) top listing for this Process to trace the
growing memmory usage */
?>
Expected result:
----------------
Less Memory Usage in the top listing.
Actual result:
--------------
Much Memory Usage in the top listing.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37577&edit=1