aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to Share Read only Data between processes.


From: Martin Norbäck
Subject: Re: Best way to Share Read only Data between processes.
Date: Mon, 17 Jan 2000 13:09:25 +0100

Mon Jan 17 2000, Kevin Atkinson ->
> Could some of the unix programers on the list give me some hints as the
> best way to share readonly memory between processes.  Specially I would
> like for multiple aspell processes to be able to share the main word
> list.  Is formatting the data file so that it can be directly read into
> memory without any processing and using mmap the best bet?  Or is there
> a better way?

Formatting the data file so that it can be mmap:ed directly is the only
way I can think of. Processes have their own adress space, so in order
for them to share a memory segment, it either has to be on disk or on
process must be a fork of the other (in which case it inherits all
read-only segments).

If you don't want to change the database format you can mmap a temporary
file to which the first aspell process writes formatted data, and the
other aspell processes mmap:s.

        n.

-- 
[ http://www.dtek.chalmers.se/~d95mback/ ] [ PGP: 0x453504F1 ] [ UIN: 4439498 ]
    Opinions expressed above are mine, and not those of my future employees.
                  Skingra er! Det finns ingenting att förstå!

Attachment: pgpulDi0xhaT8.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]