[Numpy-discussion] Shared memory ndarrays (update)

Sturla Molden sturla at molden.no
Mon Apr 11 14:36:43 EDT 2011

"Shared memory" is memory mapping from the paging file (i.e. RAM), not a 
file on disk. They can have a name or be anonymous. I have explained why 
we need named shared memory before. If you didn't understand it, try to 
pass an instance of |multiprocessing.Array over | |multiprocessing.Queue.


Den 11.04.2011 20:11, skrev srean:
> Apologies for adding to my own post. |multiprocessing.Array(...) uses 
> an anonymous mmapped file. I am not sure if that means it is resident 
> on RAM or the swap device. But my original question remains, what are 
> the pros and cons of using it versus numpy mmapped arrays. If 
> ||multiprocessing.Arrayis indeed resident in memory (subject to 
> swapping of course) that would still be advatageous compared to a file 
> mapped from a on-disk filesystem.|
> On Mon, Apr 11, 2011 at 12:42 PM, srean <srean.list at gmail.com 
> <mailto:srean.list at gmail.com>> wrote:
>     Hi everyone,
>       I was looking up the options that are available for shared
>     memory arrays and this thread came up at the right time. The doc
>     says that|multiprocessing.Array(...) gives a shared memory array.
>     But from the code it seems to me that it is actually using a mmap.
>     Is that correct a correct assessment, and if so, is there any
>     advantage in using ||multiprocessing.Array(...)over simple numpy
>     mmaped arrays.
>     Regards
>       srean
>     ||| 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110411/2635f75d/attachment.html>

More information about the NumPy-Discussion mailing list