|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-09 13:38 UTC] cataphract@php.net
[2010-09-10 05:04 UTC] aharvey@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: aharvey
[2010-09-10 05:04 UTC] aharvey@php.net
[2010-09-10 05:08 UTC] aharvey@php.net
[2010-09-10 05:08 UTC] aharvey@php.net
-Status: Assigned
+Status: Closed
[2010-09-10 05:08 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
Description: ------------ ext/standard/file.c#560 560 /* uses mmap if possible */ 561 if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) { main/php_streams.h 431 /* read all data from stream and put into a buffer. Caller must free buffer when done. 432 * The copy will use mmap if available. */ 433 PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen, 434 int persistent STREAMS_DC TSRMLS_DC); 435 #define php_stream_copy_to_mem(src, buf, maxlen, persistent) _php_stream_copy_to_mem((src), (buf), (maxlen), (persistent) STREAMS_CC TSRMLS_CC) main/php_streams.h 419 /* copy up to maxlen bytes from src to dest. If maxlen is PHP_STREAM_COPY_ALL, copy until eof(src). 420 * Uses mmap if the src is a plain file and at offset 0 */ 421 #define PHP_STREAM_COPY_ALL ((size_t)-1) In this last case, PHP_STREAM_COPY_ALL is also passed to php_stream_copy_to_stream_ex, which still uses mmap+mmap_unmap, so it's half correct (except for the part is works with any maxlen, not just PHP_STREAM_COPY_ALL).