Alexandre Julliard writes:
> > I have verified under win95, that this is possible. In fact, as soon
> > as pages are commited by one process, they are available to the
> > other processes, which have the same section mapped, too.
>
> I don't know how this behaves under NT. Do you have a small test app
> to check this?
Find the following files attached:
1. filemap.exe: This cuiexe creates a anonymous file mapping object
(three pages long), waits a minute, checks if the mapping did exist
allready, and - if not - commits two of the three pages and waits
again a minute
if you start this exe twice within one minute, you will see, that
the pages appear commited in the second process two (at least on
win95)
2. filemap.c: source code for filemap.exe
3. ssapp.tgz: tar archiv containing source and binaries for a cuiexe,
consisting of an exe and a dll with a shared section. When the dll
is initialized the first time, it creates an shared heap and stores
a string there. The exe loads the dll and calls a function, with
displays the string. Under win95 it will be displayed after every
invocation. Furthermore you can use a debugger to see the string
in the address spaces of all other processes.
> Anyway it should be possible to ignore SEC_RESERVE in this case and
> commit everything at once.
That would mean in every case, because we don't no if another app will
map the same object :-( Also it might be possible, that some app is
expecting exceptions, if it access not commited memory?
> If we do it this way then all shared mappings would be allocated from
> the global shared area, and always be read/write for everybody, so we
> wouldn't have this problem. But then of course, even Win95 will seem
> quite stable compared to us.
Yes :-/
Greetings,
Peter
filemap_main.c
filemap.exe
ssdll.tgz
--
Peter Ganten
[EMAIL PROTECTED]