"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.

|Sturla


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.l...@gmail.com <mailto:srean.l...@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@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to