From ebbd77a6877dfe03e11f0b9eca9b24d18494edd4 Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Mon, 1 Jan 2001 00:34:25 +0000 Subject: [PATCH] We never use MMAP_SEGMENT_SIZE, and we are better off determining if we 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 | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index e31edd11b0..6fe55272b0 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -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) { -- 2.50.1