If a system has mmap() a readfile() will mmap the entire file to memory
and then dump that while without mmap it will read it one block at a time.
That's a siginificant memory difference and one that may not be expected.
Obviously the mmap will be faster, but if as in bug #10701, someone is
adding headers or doing something else to really large files, things are
going to break. Since readfile() already has an opotional argument I
think the right approach is a separate function that turns the mmap off
and reads the file block by block. fpassthru() doesn't have an optional
arg, so we could toggle it there for that function.
Comments?
-Rasmus
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]