Re: sharing memory map between processes (same parent)



On Mon, 28 Apr 2008 14:25:48 -0700 (PDT) David Schwartz <davids@xxxxxxxxxxxxx> wrote:
| On Apr 28, 10:53 am, phil-news-nos...@xxxxxxxx wrote:
|
|> | What's your outer problem? Why not just have the other process create
|> | the mapping itself? The answer to your question would be very
|> | different if the reason was that the mapping was private than it would
|> | be if the problem was that the mapping contains pointers and needs to
|> | be at the same address for all processes.
|
|> The idea is to have some of the work spread out between processes and avoid
|> having to use threads (because I don't want to share the whole VM). There
|> is a way to transfer (already open) file descriptors between processes. I
|> was hoping there might be a similar way to transfer already mapped pages
|> between processes. But if there is not, I will just have to do things some
|> other way.
|
| You didn't answer my question. I still don't know why you don't just
| have each process open the mapping itself. Is it because you need the
| mappings to be at the same address? Is it because the mappings are
| private? What is the problem that you think this would solve?

There's no need to open the mapping twice. It's only needed one. The
idea is for one process to go ahead and open and map the file and have
it all ready, maybe even with a few pages referenced, and hand it over
to the next process. That's what I do now with open descriptors. One
process opens the descriptor and hands it over to another process to
read from.


|> | You have a habit of posting suggested solutions rather than problems.
|
|> You have a habit of being accusatory. But I've only noticed this over the
|> past couple years. I remember long ago your postings were more civil.
|
| I remember you as being a pretty bright guy, but honestly, your posts
| seems to be getting, for lack of a better word, dumber. This is the
| second time I've asked what I thought was a pretty clear question and
| even included examples of what would be a good or possible answer, and
| didn't get anywhere.

I do purposely try to avoid answering questions that go off track of what I
an seeking answers for. I used to not do that, and that would almost always
result in a pointless drawn out thread with someone else trying to suggest
ways to do things that would not really work because of many issues in the
program, that I didn't post in the first place because they were not relevant
to


| Any time you ask a question, expect the response "why don't you do it
| the usual way?" and give the answer in the question. Why not just have
| each process map it itself? That's more efficient, because it doesn't
| require extra coordination.

When I ask, expect that I have checked out the "usual" way, and that either
that way doesn't work for some reason, or that I am already doing it that way
and am exploring to find another way.

If I describe some particular way to do something and ask if it is available
in some system, then I'm not interested in other ways, even though one of the
other ways might be the usual. If I describe what end result I want and ask
how to accomplish it, then any method to accomplish it is fair game.

If what I want to do cannot be done, then just say "no" or don't say. But do
not make assumptions about what other stuff I may or may not have explored.
If you are curious what I have explored, you can always ask. I may or may not
be interested in pursing that subthread.

--
|WARNING: Due to extreme spam, I no longer see any articles originating from |
| Google Groups. If you want your postings to be seen by more readers |
| you will need to find a different place to post on Usenet. |
| Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) |
.



Relevant Pages

  • Re: sharing memory map between processes (same parent)
    ... |> There's no need to open the mapping twice. ... |> process opens the descriptor and hands it over to another process to ... map the file in the first process. ... On a slow machine, ...
    (comp.unix.programmer)
  • Re: sharing memory map between processes (same parent)
    ... |> | different if the reason was that the mapping was private than it would ... That's what I do now with open descriptors. ... process opens the descriptor and hands it over to another process to ...
    (comp.unix.programmer)
  • change "My SIte" URL to a custom page
    ... Sharepoint portal site, or just type http://server/MySite ... it opens the page "default.aspx" (i.e ... do u know where the mapping (clicking of "My SIte" ... can I edit this mapping, ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: CreateFileMapping Question
    ... It is safe to assume that memory management is going on correctly under the mapping. ... SampeTransferType cannot use pointers, since pointers set by one process will be nonsense ... ITS address space 0x100000, process A opens the mapping, and gets 0x200000, but after B ...
    (microsoft.public.vc.mfc)
  • Re: limit on the number of mmap()d files
    ... > the default 64k space per mapping won't help you here since you're ... it uses avl trees for address space segments so having hundreds of ... We've been closing the file descriptors, so I think the real issue was ... In fact google has perfect recall: ...
    (comp.unix.solaris)