Re: readfile() memory usage
| From: | Pierre Joye | Date: | Mon, 30 Apr 2012 08:05:35 +0000 |
| Subject: | Re: readfile() memory usage | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60373@lists.php.net to get a copy of this message | ||
hi!
On Mon, Apr 30, 2012 at 8:25 AM, Uwe Schindler <thetaphi@php.net> wrote:
> - If the underlying stream allows MMAP, it will use memory mapping (mapping
> file to *virtual* memory) and copy the mapped buffer to output. Please note
> memory mapping does *not* load the file into memory, it only *maps* the file
> contents to virtual memory like a swap file
> (http://en.wikipedia.org/wiki/Mmap).
Some additional notes:
mmap may use "normal" memory too, depending on the options (not sure
which are used exactly with readfile or stream's mmap).
About php memory usage, one has to use an external tools to actually
see this memory usage as it is not managed by the zend memory manager.
Cheers,
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org