diff options
author | Antony Dovgal <tony2001@php.net> | 2008-03-24 16:28:35 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2008-03-24 16:28:35 +0000 |
commit | fc134fd6c591aa7f6c601ae93d42aefce20efe5c (patch) | |
tree | 63e03a939286d511ebf700f306be23cda26e5199 /main | |
parent | 2b27e2c8a4d3d7d3e53a60e7dde05f031b199d45 (diff) | |
download | php-git-fc134fd6c591aa7f6c601ae93d42aefce20efe5c.tar.gz |
MFH: disabled mmap() when copying files to memory
Diffstat (limited to 'main')
-rwxr-xr-x | main/streams/streams.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 5167a71606..03607cdb5d 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1221,26 +1221,6 @@ PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen maxlen = 0; } - if (php_stream_mmap_possible(src)) { - char *p; - size_t mapped; - - p = php_stream_mmap_range(src, php_stream_tell(src), maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped); - - if (p && mapped) { - *buf = pemalloc_rel_orig(mapped + 1, persistent); - - if (*buf) { - memcpy(*buf, p, mapped); - (*buf)[mapped] = '\0'; - } - - php_stream_mmap_unmap(src); - - return mapped; - } - } - if (maxlen > 0) { ptr = *buf = pemalloc_rel_orig(maxlen + 1, persistent); while ((len < maxlen) & !php_stream_eof(src)) { |