httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: http_main.c
Date Thu, 20 Nov 1997 21:25:02 GMT

On Thu, 20 Nov 1997, Ben Hyde wrote:

> I've a rant I like to inflict on people about how clean
> code tends to get abused until it becomes sufficently
> obscure to defend it's self.  http_main.c is a fine
> example of that.

http_main cleanup is at the top of my 2.0 priority list.  The merge of the
WIN32 stuff has pushed http_main beyond readable.

> I'm bemused by HAVE_MMAP being redefined in there for
> WIN32 but in point of fact it never calls MMAP.  Does
> Win32 not define USE_MMAP_FILES because: (a) it would be
> slower, (b) the code is yet to be written, (c)
> none of the above.

I've no idea why other ports abuse HAVE_MMAP ... and "HAVE_MMAP" is a
complete misnomer for what it means... it really means "use mmap to
implement multi-process shared memory".

USE_MMAP_FILES on the other hand means use mmap() to speed up static file
serving in the default_handler.

I'm not aware of mmap()'s existence under WIN32... and wouldn't trust it
anyhow :)  I believe the way to get the similar performance benefit under
win32 is to use the CopyFile syscall.  Or something like that.

> Can somebody enumerate the dimensions of the current
> process models in Apache.  It seems to be something
> like this:
>   Scoreboard
>     - In file
>     - In SharedMemory between processes

right, with four choices: mmap(), shmget(), OS/2, QNX

>     - In SharedMemory between threads

right, with one choice: WIN32

>   Process and thread
>     - One process

We don't have any port that currently is in this model (unless you
consider "inetd mode" and "-X" ... which I don't).

>     - One process as master, N process as Servers

Unix, OS/2 both use this model. 

>     - N processes, 1 process as Server (using threads)

I've never understood why the NT port spawns multiple processes.  As far
as I can tell only one of them does anything. 

>   "Service"
>     - Stand alone run by user.
>     - Managed by inet


>     - Managed by Window's Services


View raw message