Using the backing store with mmap

JKPeck JKPeck at gmail.com
Wed Jun 25 09:29:28 EDT 2008


According to the mmap.mmap 2.5 documentation,
"Changed in version 2.5: To map anonymous memory, -1 should be passed
as the fileno along with the length."

I would like to use shared memory to communicate between two processes
that otherwise have no way to communicate, but I couldn't find a way
to share anonymous memory.  (I can use file names agreed on by
convention, but the file is really irrelevant, and I'd prefer to
eliminate it.)  Is this possible?  What is the lifetime of this shared
memory?  Is it in fact private to the creating process, or is it
shared among all (Python) processes?  Does it need to be flushed by a
writing process?  How do the access flags relate to this?  If I create
two such items, are they independent, or is it all one pool?

TIA,
Jon Peck



More information about the Python-list mailing list