limit for mmaping for readfile (Bug #19749)

From: Date: Tue, 20 Apr 2004 21:10:08 +0000
Subject: limit for mmaping for readfile (Bug #19749)
Groups: php.internals 
Request: Send a blank email to internals+get-9438@lists.php.net to get a copy of this message
http://bugs.php.net/bug.php?id=19749 It's been playing on my mind recently that this bug hasn't been addressed; the problem was how to guess precisely what limit to set for mmaping when doing something like readfile(). [note that some comments are missing from the bugdb for that bug] Well, we can solve the problem by allowing the sysadmin to decide, as you can see in my patch against PHP 5: http://www.php.net/~wez/mmap-limit.diff The default limit is 8MB. If the limit is set to 0, no limit is applied. This is separate from memory_limit, so PHP could potentially use double the default memory amount for a short period of time. This is still better than allowing it to eat all the RAM when someone decides to readfile() large media files for example. --Wez.

« previous php.internals (#9438) next »