On 04/30/2012 07:37 PM, Paul Reinheimer wrote:
Hi Larry,
4) So given #2 and #3, the "readfile() will kill your memory, don't use it"
line is a persistent urban legend that belongs on Snopes as debunked.
Looping on fread() for performance is a red herring.
I implemented this earlier this very
Hi Larry,
> 4) So given #2 and #3, the "readfile() will kill your memory, don't use it"
> line is a persistent urban legend that belongs on Snopes as debunked.
> Looping on fread() for performance is a red herring.
I implemented this earlier this very year to avoid memory issues (a
quick look at
Hi Larry,
>From my understanding this is correct, except the part about the code
history: I am not sure what PHP did in the past (before the new streams
API), so before saying that it was always this way, you should review
ext/std/file.c and main/streams.c in the GIT/SVN/CVS history! But the other
hi,
On Mon, Apr 30, 2012 at 3:05 PM, Nikita Popov wrote:
> I changed the vote to have three options: "Both empty() and isset()",
> "Only empty()" or "None"
>
> https://wiki.php.net/rfc/empty_isset_exprs#vote
Please post a top thread to notice everyone about this new vote with a
short explanatio
Thanks all. So it sounds like the answer is:
1) readfile() has always been memory-safe as far as PHP is concerned.
2) Because it uses mmap(), GFL trying to understand its memory usage
from top.
3) Operating systems have gotten better at such things in the past decade.
4) So given #2 and #3, th
On Mon, Apr 30, 2012 at 9:50 AM, Patrick ALLAERT wrote:
> Hi,
>
> 2012/4/12 Nikita Popov :
>> PS: I added isset() too, to address the consistency concerns mentioned on
>> IRC.
>
> I would have voted +1 if it didn't contain the isset() change. None of
> the examples used in the isset_with_expr.php
On Mon, Apr 30, 2012 at 9:50 AM, Patrick ALLAERT wrote:
> Hi,
>
> 2012/4/12 Nikita Popov :
>> PS: I added isset() too, to address the consistency concerns mentioned on
>> IRC.
>
> I would have voted +1 if it didn't contain the isset() change. None of
> the examples used in the isset_with_expr.php
> Mmapping of course uses memory, but the memory used here is not from PHP's
> memory manager, it's memory that's already used for the O/S cache. The
> memory mapping used here does not enforce loading the file contents into O/S
> cache; it just gets a virtual address into the O/S cache. If the act
Hi,
> mmap may use "normal" memory too, depending on the options (not sure
> which are used exactly with readfile or stream's mmap).
Mmapping of course uses memory, but the memory used here is not from PHP's
memory manager, it's memory that's already used for the O/S cache. The
memory mapping use
hi!
On Mon, Apr 30, 2012 at 8:25 AM, Uwe Schindler 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
> c
Hi,
2012/4/12 Nikita Popov :
> PS: I added isset() too, to address the consistency concerns mentioned on IRC.
I would have voted +1 if it didn't contain the isset() change. None of
the examples used in the isset_with_expr.phpt test seems logic to me.
Care to explain the consistency concerns here
11 matches
Mail list logo