httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject [PATCH] Re: general/1491: mmap_handler error_log entry for 0 length files
Date Fri, 28 Nov 1997 19:24:19 GMT
One more iteration trying to get the mmap code just right ... don't try to
mmap zero length files. 

Dean

Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
retrieving revision 1.141
diff -u -r1.141 http_core.c
--- http_core.c	1997/11/22 01:59:57	1.141
+++ http_core.c	1997/11/28 19:19:21
@@ -75,15 +75,15 @@
  * <http://www.isi.edu/~johnh/SOFTWARE/APACHE/index.html>.
  */
 
-/* Files have to be at least this big before they're mmap()d.  This is to
- * deal with systems where the expense of doing an mmap() and an munmap()
- * outweighs the benefit for small files.
+/* Files have to be at least this big before they're mmap()d.  This is to deal
+ * with systems where the expense of doing an mmap() and an munmap() outweighs
+ * the benefit for small files.  It shouldn't be set lower than 1.
  */
 #ifndef MMAP_THRESHOLD
 #ifdef SUNOS4
 #define MMAP_THRESHOLD		(8*1024)
 #else
-#define MMAP_THRESHOLD		0
+#define MMAP_THRESHOLD		1
 #endif
 #endif
 #endif


Mime
View raw message