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 Wed, 24 Oct 2007 18:21:07 GMT
William A. Rowe, Jr. wrote:
> Why?
> Win32 anonymous shared memory is actually file backed (backed, of course
> by the swap file).

I'm not talking about anonymous shared memory (which can only be shared with
child processes). Maybe I misunderstand how shm/mmap work, but my concern is
I'm using half the memory allocated (one part file, one part RAM). This is
an unnecessary problem on CE where files are stored in RAM (there's no swap
file as it would be stored in RAM). Although there are persistent storage
areas, they're not needed/used in this case.

As you point out, it would result in three copies of the same data when only
one copy may be desired. In my case, only one copy is desired.

It seems like extra work to me to have to provide an actual file for shared
memory rather than just have a key-based (for uniqueness) block of shared
memory. It also doesn't differentiate between memory-mapped files. What's
the point of shared memory if it behaves exactly like memory-mapped files?

View raw message