Author: Alex Gaynor <[email protected]>
Branch: 
Changeset: r62372:c1212ae53dc9
Date: 2013-03-16 12:21 -0700
http://bitbucket.org/pypy/pypy/changeset/c1212ae53dc9/

Log:    (alex, fijal): fix for mmap on OSX: mmap requires either MAP_SHARED
        or MAP_PRIVATE be massed

diff --git a/rpython/rlib/rmmap.py b/rpython/rlib/rmmap.py
--- a/rpython/rlib/rmmap.py
+++ b/rpython/rlib/rmmap.py
@@ -680,6 +680,9 @@
         else:
             m.fd = os.dup(fd)
 
+        if sys.platform == "darwin" and not flags & MAP_SHARED:
+            flags |= MAP_PRIVATE
+
         # XXX if we use hintp below in alloc, the NonConstant
         #     is necessary since we want a general version of c_mmap
         #     to be annotated with a non-constant pointer.
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to