[pypy-commit] pypy concurrent-marksweep: Fix for test_newgc.

arigo noreply at buildbot.pypy.org
Sun Oct 9 18:26:48 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: concurrent-marksweep
Changeset: r47900:8b51157e362c
Date: 2011-10-09 15:46 +0200
http://bitbucket.org/pypy/pypy/changeset/8b51157e362c/

Log:	Fix for test_newgc.

diff --git a/pypy/rpython/lltypesystem/opimpl.py b/pypy/rpython/lltypesystem/opimpl.py
--- a/pypy/rpython/lltypesystem/opimpl.py
+++ b/pypy/rpython/lltypesystem/opimpl.py
@@ -198,7 +198,7 @@
     return intmask(x - y)
 
 def op_int_eq(x, y):
-    # specail case for MultipleOf4
+    # special case for MultipleOf4
     assert isinstance(x, (int, llmemory.MultipleOf4))
     assert isinstance(y, int)
     return x == y
diff --git a/pypy/rpython/memory/gc/concurrentms.py b/pypy/rpython/memory/gc/concurrentms.py
--- a/pypy/rpython/memory/gc/concurrentms.py
+++ b/pypy/rpython/memory/gc/concurrentms.py
@@ -380,7 +380,7 @@
         adr = llarena.getfakearenaaddress(adr)
         llarena.arena_reset(adr, self.HDRSIZE, 0)
         llarena.arena_reserve(adr, totalsize)
-        return adr + llmemory.raw_malloc_usage(self.HDRSIZE)
+        return adr + self.gcheaderbuilder.size_gc_header
     grow_reservation._always_inline_ = True
 
     def write_barrier(self, newvalue, addr_struct):
@@ -544,7 +544,6 @@
             raise
 
     def acquire(self, lock):
-        #debug_print("acquire", ll_thread.get_ident(), self.main_thread_ident)
         if (we_are_translated() or
                 ll_thread.get_ident() != self.main_thread_ident):
             ll_thread.c_thread_acquirelock(lock, 1)
@@ -555,7 +554,6 @@
                 # ---------- EXCEPTION FROM THE COLLECTOR THREAD ----------
                 if hasattr(self, '_exc_info'):
                     self._reraise_from_collector_thread()
-        #debug_print("ok", ll_thread.get_ident(), self.main_thread_ident)
 
     def release(self, lock):
         ll_thread.c_thread_releaselock(lock)


More information about the pypy-commit mailing list