]> granicus.if.org Git - apache/commitdiff
We never use MMAP_SEGMENT_SIZE, and we are better off determining if we
authorRyan Bloom <rbb@apache.org>
Mon, 1 Jan 2001 00:34:25 +0000 (00:34 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 1 Jan 2001 00:34:25 +0000 (00:34 +0000)
have MMAP, by just checking with APR, instead of using an Apache
definition which doesn't really control anything anymore.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87563 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index e31edd11b0bc96dfaf211c5ae27872c8fe2f8561..6fe55272b091450e34f06e956195fcea02f7c88c 100644 (file)
@@ -2975,21 +2975,7 @@ AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of
     return rv;
 }
 
-#ifdef AP_USE_MMAP_FILES
-
-/* The code writes MMAP_SEGMENT_SIZE bytes at a time.  This is due to Apache's
- * timeout model, which is a timeout per-write rather than a time for the
- * entire transaction to complete.  Essentially this should be small enough
- * so that in one Timeout period, your slowest clients should be reasonably
- * able to receive this many bytes.
- *
- * To take advantage of zero-copy TCP under Solaris 2.6 this should be a
- * multiple of 16k.  (And you need a SunATM2.0 network card.)
- */
-#ifndef MMAP_SEGMENT_SIZE
-#define MMAP_SEGMENT_SIZE       32768
-#endif
-
+#if APR_HAS_MMAP
 /* send data from an in-memory buffer */
 AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
                              size_t length)
@@ -3004,7 +2990,7 @@ AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
 
     return mm->size; /* XXX - change API to report apr_status_t? */
 }
-#endif /* AP_USE_MMAP_FILES */
+#endif /* APR_HAS_MMAP */
 
 AP_DECLARE(int) ap_rputc(int c, request_rec *r)
 {