tony2001                Mon Mar 24 16:28:35 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/main/streams       streams.c 
  Log:
  MFH: disabled mmap() when copying files to memory
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.18.2.5&r2=1.82.2.6.2.18.2.6&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.82.2.6.2.18.2.5 
php-src/main/streams/streams.c:1.82.2.6.2.18.2.6
--- php-src/main/streams/streams.c:1.82.2.6.2.18.2.5    Sat Jan 12 15:50:57 2008
+++ php-src/main/streams/streams.c      Mon Mar 24 16:28:35 2008
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.82.2.6.2.18.2.5 2008/01/12 15:50:57 cellog Exp $ */
+/* $Id: streams.c,v 1.82.2.6.2.18.2.6 2008/03/24 16:28:35 tony2001 Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -1221,26 +1221,6 @@
                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)) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to