httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hyde <bh...@gensym.com>
Subject RE: [BUG] Solaris mmap
Date Mon, 17 Nov 1997 21:47:11 GMT
Very sorry, not a very impressive performance so far.
I sent an earlier context diff.  Your diff matches my current sources
(ignoring spaces) now, and it compiles and eliminates the error log
entries.  - ben

> -----Original Message-----
> From:	Dean Gaudet [SMTP:dgaudet@arctic.org]
> Sent:	Monday, November 17, 1997 4:17 PM
> To:	'new-httpd@apache.org'
> Subject:	RE: [BUG] Solaris mmap
> 
>  Er, I think you meant this.  Your if stmt was missing the "mm =="
> before
> (caddrt_t)-1. 
> 
> Dean
> 
> Index: main/http_core.c
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
> retrieving revision 1.140
> diff -u -r1.140 http_core.c
> --- http_core.c	1997/11/15 00:16:50	1.140
> +++ http_core.c	1997/11/17 21:14:46
> @@ -1864,21 +1864,20 @@
>      block_alarms();
>      if ((r->finfo.st_size >= MMAP_THRESHOLD)
>  	&& ( !r->header_only || (d->content_md5 & 1))) {
> -      /* we need to protect ourselves in case we die while we've got
> the
> +	/* we need to protect ourselves in case we die while we've got
> the
>   	 * file mmapped */
>  	mm = mmap (NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE,
>  		    fileno(f), 0);
> +	if (mm == (caddr_t)-1) {
> +	    aplog_error(APLOG_MARK, APLOG_CRIT, r->server,
> +			"mmap_handler: mmap failed: %s", r->filename);
> +	}
>      } else {
>  	mm = (caddr_t)-1;
>      }
>  
>      if (mm == (caddr_t)-1) {
>  	unblock_alarms();
> -
> -	if (r->finfo.st_size >= MMAP_THRESHOLD) {
> -	    aplog_error(APLOG_MARK, APLOG_CRIT, r->server,
> -			"mmap_handler: mmap failed: %s", r->filename);
> -	}
>  #endif
>  
>  	if (d->content_md5 & 1) {

Mime
View raw message