Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 23473 invoked by uid 6000); 28 Nov 1997 19:20:12 -0000 Received: (qmail 23467 invoked from network); 28 Nov 1997 19:20:11 -0000 Received: from twinlark.arctic.org (204.62.130.91) by taz.hyperreal.org with SMTP; 28 Nov 1997 19:20:11 -0000 Received: (qmail 2015 invoked by uid 500); 28 Nov 1997 19:24:19 -0000 Date: Fri, 28 Nov 1997 11:24:19 -0800 (PST) From: Dean Gaudet To: new-httpd@apache.org Subject: [PATCH] Re: general/1491: mmap_handler error_log entry for 0 length files In-Reply-To: <19971128175938.11927.qmail@hyperreal.org> Message-ID: Legal: "Copyright (c) 1997 Dean Gaudet, all rights reserved. Visit http://www.arctic.org/~dgaudet/legal for more information." Organization: Transmeta Corp. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org 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 @@ * . */ -/* 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