[pypy-svn] r79091 - in pypy/branch/jit-free/pypy/jit/backend: llsupport x86

arigo at codespeak.net arigo at codespeak.net
Mon Nov 15 13:32:58 CET 2010


Author: arigo
Date: Mon Nov 15 13:32:56 2010
New Revision: 79091

Modified:
   pypy/branch/jit-free/pypy/jit/backend/llsupport/gc.py
   pypy/branch/jit-free/pypy/jit/backend/x86/assembler.py
   pypy/branch/jit-free/pypy/jit/backend/x86/regalloc.py
Log:
For future reference: record places that leak even with loop freeing,
and that we need to fix, with YYY.


Modified: pypy/branch/jit-free/pypy/jit/backend/llsupport/gc.py
==============================================================================
--- pypy/branch/jit-free/pypy/jit/backend/llsupport/gc.py	(original)
+++ pypy/branch/jit-free/pypy/jit/backend/llsupport/gc.py	Mon Nov 15 13:32:56 2010
@@ -254,7 +254,7 @@
     def _enlarge_gcmap(self):
         newlength = 250 + self._gcmap_maxlength * 2
         newgcmap = lltype.malloc(self.GCMAP_ARRAY, newlength, flavor='raw',
-                                 track_allocation=False)
+                                 track_allocation=False)   # YYY leak
         oldgcmap = self._gcmap
         for i in range(self._gcmap_curlength):
             newgcmap[i] = oldgcmap[i]
@@ -311,7 +311,7 @@
         length = len(shape)
         compressed = lltype.malloc(self.CALLSHAPE_ARRAY, length,
                                    flavor='raw',
-                                   track_allocation=False)   # memory leak
+                                   track_allocation=False)   # YYY leak
         for i in range(length):
             compressed[length-1-i] = rffi.cast(rffi.UCHAR, shape[i])
         return llmemory.cast_ptr_to_adr(compressed)

Modified: pypy/branch/jit-free/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/jit-free/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/jit-free/pypy/jit/backend/x86/assembler.py	Mon Nov 15 13:32:56 2010
@@ -409,8 +409,9 @@
 
     def _register_counter(self):
         if self._debug:
+            # YYY leak -- just put it in self.mc instead
             struct = lltype.malloc(DEBUG_COUNTER, flavor='raw',
-                                   track_allocation=False)   # known to leak
+                                   track_allocation=False)
             struct.i = 0
             self.loop_run_counters.append((len(self.loop_run_counters), struct))
         

Modified: pypy/branch/jit-free/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/jit-free/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/jit-free/pypy/jit/backend/x86/regalloc.py	Mon Nov 15 13:32:56 2010
@@ -70,7 +70,7 @@
     def _get_new_array(self):
         n = self.BASE_CONSTANT_SIZE
         # known to leak
-        self.cur_array = lltype.malloc(rffi.CArray(lltype.Float), n,
+        self.cur_array = lltype.malloc(rffi.CArray(lltype.Float), n, # YYY leak
                                        flavor='raw', track_allocation=False)
         self.cur_array_free = n
     _get_new_array._dont_inline_ = True



More information about the Pypy-commit mailing list