Davin Potts <pyt...@discontinuity.net> added the comment:

Unless I am missing something, memfd_create appears to be specific to the Linux 
kernel still so we would need to replicate its behavior on all of the other 
unix systems.

To your point, but quoting from the docs, "separate invocations of memfd_create 
with the same name will not return descriptors for the same region of memory".  
If it is possible to use the anonymous shared memory created via memfd_create 
in another process (which is arguably the primary motivation / use case for 
multiprocessing.shared_memory), we would need to replicate the unique way of 
referencing a shared memory segment when trying to attach to it from other 
processes.

To permit resource management of a shared memory segment (in the sense of 
ensuring the shared memory segment is always unlinked at the end), the 
multiprocessing.managers.SharedMemoryManager exists.  Because destroying a 
shared memory segment at exit is not always desirable, the SharedMemoryManager 
provides additional control over when it is appropriate to unlink a shared 
memory segment.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37185>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to