4 ms·
I agree with you, but in practice, there won't be as much memory replication as you assume. Linux (and I assume most modern OSes) implement copy-on-write: no da
by scott_s 17y ago
I agree with you, but in practice, there won't be as much memory replication as you assume. Linux (and I assume most modern OSes) implement copy-on-write: no data is copied until a write occurs. So as long as the separate process only read that large data set, that large data set should exist in memory only once.
- FooBarWidget 17y agoException multiprocessing does not use fork() (without exec()) because it has to be compatible with Windows.
- rbanffy 17y agoLike I use to say: that's Microsoft holding everybody back. ;-) Now, seriously, can we implement a better multiprocessing module for those with modern OSs and leave a less functional one (one that will raise a LesserOSError when certain functionality is invoked)?
- jnoller 17y agoIncorrect; On linux and OS/X it uses fork. On windows it uses a best-effort clone.