apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ioan Popescu <ipope...@dataq.com>
Subject Re: SHM
Date Fri, 26 Oct 2007 13:06:24 GMT
Mladen Turk wrote:
> What we could do is to have a backup file but like with unix
> APR_USE_SHMEM_SHMGET only store the size of the shared memory in it
> and use named swap for the actual share. You can do it for CE only, cause
> IMO there are no real benefits on NT platforms where it might even not
> work if the share is on the network drive.

I was under the impression that the file had to be the same size as the
mapped region.

In your case, not having a file would solve the network storage issue... Why
do you need the file? Why store the size? CreateFileMapping() on NT/CE tells
you if the map already exists and how big it is, no guessing. Unfortunately,
this doesn't seem to be available on all platforms... Is that the reason for
file backing? To determine the size?

Again, I'm just looking for a way to use shared memory, plain and simple; no
file, etc. If there's another portable way to do it, great. But I still
don't see the point of having two different interfaces shm/mmap behave
exactly the same way.

View raw message