[pypy-svn] r51626 - pypy/branch/no-forw-ptr/pypy/rpython/memory

arigo at codespeak.net arigo at codespeak.net
Tue Feb 19 13:03:50 CET 2008


Author: arigo
Date: Tue Feb 19 13:03:49 2008
New Revision: 51626

Modified:
   pypy/branch/no-forw-ptr/pypy/rpython/memory/support.py
Log:
Translation fix for prebuilt AddressStack and AddressDeque.


Modified: pypy/branch/no-forw-ptr/pypy/rpython/memory/support.py
==============================================================================
--- pypy/branch/no-forw-ptr/pypy/rpython/memory/support.py	(original)
+++ pypy/branch/no-forw-ptr/pypy/rpython/memory/support.py	Tue Feb 19 13:03:49 2008
@@ -26,7 +26,10 @@
 
         def get(self):
             if not self.free_list:
-                return lltype.malloc(CHUNK, flavor="raw")
+                # we zero-initialize the chunks to make the translation
+                # backends happy, but we don't need to do it at run-time.
+                zero = not we_are_translated()
+                return lltype.malloc(CHUNK, flavor="raw", zero=zero)
                 
             result = self.free_list
             self.free_list = result.next



More information about the Pypy-commit mailing list