mmap and shared memory

Tim Roberts timr at probo.com
Tue Feb 12 02:17:21 EST 2008


Matias Surdi <matiassurdi at gmail.com> wrote:

>Suppose I've a process P1, which generates itself a lot of data , for 
>example 2Mb.
>Then, I've a process P2 which must access P1 shared memory and, 
>probably, modify this data.
>To accomplish this, I've been digging around python's mmap module, but I 
>can't figure how to use it without files.

So, let it use a temporary file.  What's the harm?  An anonymous mmap
region is still mapped to the swap file.  Might as well give it a name.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list