httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Costello" <timcoste...@ozemail.com.au>
Subject shmem on win32 (was RE: cvs commit: apache-2.0/src/modules/standard mod_auth_digest.c)
Date Fri, 02 Jun 2000 10:39:44 GMT
On Friday, 02 June 2000, William A. Rowe, Jr. wrote:
> But I'm getting past myself, and have been trying to avoid
> the two ongoing streams of consiousness.  I'm simply trying to
> implement shmem on Win32, not that we need it or want it :-)

Cool... how? I recall reading somewhere that the only way to do it
properly on win32 was by using memory mapped files. Anyone know a
better way? 

...
> But I have one question about ap_shm_ functions... do we have
> any implicit/explicit assumption that the memory in process A
> is at the same physical address as process B?  This is a HUGE
> question under Win32, and probably other hybrid kernels.
> 
> Of course, this implies you may NEVER have a pointer x in any
> shm_alloc'ed structure in the conventional sense.  First, if
> you point at the int y in the same shm, you will find that the
> address of y jumped in process 2.  You CAN use the relative 
> offset of y from x to store the pointer, and that offset will
> remain the same.

I agree. From what I've read so far, I don't think it's possible 
to support anything like this with memory mapped files. Relative 
addresses are okay - and for what it's worth, and microsoft c 
provides based pointers for this sort of job. syntax is like
    int __based(pStartShMem) *pointerToSomeNumber;

Tim

Mime
View raw message