[pypy-svn] r79024 - pypy/trunk/pypy/rpython/memory/gc

arigo at codespeak.net arigo at codespeak.net
Fri Nov 12 10:48:47 CET 2010


Author: arigo
Date: Fri Nov 12 10:48:44 2010
New Revision: 79024

Modified:
   pypy/trunk/pypy/rpython/memory/gc/inspector.py
Log:
Revert all checkins that were attempts to fix an issue
with inspector.py not seeing all roots.  Will be solved
more generally.  (r78981, r78943, r78939)


Modified: pypy/trunk/pypy/rpython/memory/gc/inspector.py
==============================================================================
--- pypy/trunk/pypy/rpython/memory/gc/inspector.py	(original)
+++ pypy/trunk/pypy/rpython/memory/gc/inspector.py	Fri Nov 12 10:48:44 2010
@@ -101,8 +101,7 @@
 # ----------
 
 raw_os_write = rffi.llexternal(underscore_on_windows+'write',
-                               [rffi.INT, rffi.CArrayPtr(lltype.Signed),
-                                rffi.SIZE_T],
+                               [rffi.INT, llmemory.Address, rffi.SIZE_T],
                                rffi.SIZE_T,
                                sandboxsafe=True, _nowrapper=True)
 
@@ -131,7 +130,7 @@
         if self.buf_count > 0:
             bytes = self.buf_count * rffi.sizeof(rffi.LONG)
             count = raw_os_write(self.fd,
-                                 self.writebuffer,
+                                 rffi.cast(llmemory.Address, self.writebuffer),
                                  rffi.cast(rffi.SIZE_T, bytes))
             if rffi.cast(lltype.Signed, count) != bytes:
                 raise OSError(rposix.get_errno(), "raw_os_write failed")
@@ -140,7 +139,7 @@
 
     def write(self, value):
         x = self.buf_count
-        self.writebuffer[x] = llmemory.raw_malloc_usage(value)
+        self.writebuffer[x] = value
         x += 1
         self.buf_count = x
         if x == self.BUFSIZE:
@@ -174,9 +173,6 @@
 
     def add_roots(self):
         self.gc._heap_dumper = self
-        if not self.gc.prebuilt_gc_objects_are_static_roots:
-            self.gc.prebuilt_root_objects.foreach(self.gc._collect_obj,
-                                                  self.pending)
         self.gc.root_walker.walk_roots(
             _hd_add_root,
             _hd_add_root,



More information about the Pypy-commit mailing list