Commits

Armin Rigo committed 1d42dc6

In the memmgr, free loops that have been marked as 'invalidated' too.

Comments (0)

Files changed (2)

pypy/jit/metainterp/memmgr.py

         debug_print("Loop tokens before:", oldtotal)
         max_generation = self.current_generation - (self.max_age-1)
         for looptoken in self.alive_loops.keys():
-            if 0 <= looptoken.generation < max_generation:
+            if (0 <= looptoken.generation < max_generation or
+                looptoken.invalidated):
                 del self.alive_loops[looptoken]
         newtotal = len(self.alive_loops)
         debug_print("Loop tokens freed: ", oldtotal - newtotal)

pypy/jit/metainterp/test/test_memmgr.py

 
 class FakeLoopToken:
     generation = 0
+    invalidated = False
 
 
 class _TestMemoryManager: