home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.win32
- Path: sparky!uunet!microsoft!hexnut!johnhall
- From: johnhall@microsoft.com (John Hall)
- Subject: Re: NT, 3.1, and Global Memory
- Message-ID: <1992Sep04.165347.10325@microsoft.com>
- Date: 04 Sep 92 16:53:47 GMT
- Organization: Microsoft Corporation
- Keywords: global memory
- Lines: 29
-
- In article sanzgiri@bombay.metaphor.com (Ajit Sanzgiri) writes:
- | In article johnhall@microsoft.com (John Hall) writes:
- | >....
- | >I even make heroic efforts to force all addresses to be identical
- | >across processes.
- |
- | Does one need to be heroic for this ? I thought MapViewOfFileEx
- | provides this routinely.
-
- The trick is picking the right memory address to request, since
- MapViewOfFileEx() does not guarantee that the memory will actually
- be placed where you asked for it.
-
- Therefore I grab it on the initialization of a statically linked
- library. However, that still doesn't solve it since there are
- different ways you can start an app (foreground/background,
- console/windowed) and you can't just use the first exe attach
- point with MapViewOfFile() then use that for subsequent attaches.
-
- So, I looked at the memory map for a couple of processes and
- picked one that looked good (16Mb level). This I use as a default.
- You can register an exe in the registry, assign it a logical process
- group, then set the start point and length (1Mb default) for that
- logical group of processes.
-
-
-
- --
- -------------------------
- My comments are my own. They are independent and unrelated to the
- views of my company , relatives or elected representatives.
-
-