[pypy-svn] r71711 - pypy/branch/jit-sandbox/pypy/rlib

arigo at codespeak.net arigo at codespeak.net
Wed Mar 3 18:13:42 CET 2010


Author: arigo
Date: Wed Mar  3 18:13:40 2010
New Revision: 71711

Modified:
   pypy/branch/jit-sandbox/pypy/rlib/rmmap.py
Log:
Documentation.


Modified: pypy/branch/jit-sandbox/pypy/rlib/rmmap.py
==============================================================================
--- pypy/branch/jit-sandbox/pypy/rlib/rmmap.py	(original)
+++ pypy/branch/jit-sandbox/pypy/rlib/rmmap.py	Wed Mar  3 18:13:40 2010
@@ -636,6 +636,10 @@
     hint = Hint()
 
     def alloc(map_size):
+        """Allocate memory.  This is intended to be used by the JIT,
+        so the memory has the executable bit set and gets allocated
+        internally in case of a sandboxed process.
+        """
         flags = MAP_PRIVATE | MAP_ANONYMOUS
         prot = PROT_EXEC | PROT_READ | PROT_WRITE
         hintp = rffi.cast(PTR, hint.pos)
@@ -748,6 +752,11 @@
 
     
     def alloc(map_size):
+        """Allocate memory.  This is intended to be used by the JIT,
+        so the memory has the executable bit set.  
+        XXX implement me: it should get allocated internally in
+        case of a sandboxed process
+        """
         null = lltype.nullptr(rffi.VOIDP.TO)
         res = VirtualAlloc(null, map_size, MEM_COMMIT|MEM_RESERVE,
                            PAGE_EXECUTE_READWRITE)



More information about the Pypy-commit mailing list