[pypy-svn] r68344 - pypy/branch/inline-fastpath-malloc/pypy/rpython/memory/gc

fijal at codespeak.net fijal at codespeak.net
Mon Oct 12 18:02:55 CEST 2009


Author: fijal
Date: Mon Oct 12 18:02:55 2009
New Revision: 68344

Modified:
   pypy/branch/inline-fastpath-malloc/pypy/rpython/memory/gc/generation.py
Log:
Make get_young_* staticmethods as they don't depend on runtime values


Modified: pypy/branch/inline-fastpath-malloc/pypy/rpython/memory/gc/generation.py
==============================================================================
--- pypy/branch/inline-fastpath-malloc/pypy/rpython/memory/gc/generation.py	(original)
+++ pypy/branch/inline-fastpath-malloc/pypy/rpython/memory/gc/generation.py	Mon Oct 12 18:02:55 2009
@@ -122,10 +122,12 @@
         # a new nursery (e.g. if it invokes finalizers).
         self.semispace_collect()
 
-    def get_young_fixedsize(self, nursery_size):
+    @staticmethod
+    def get_young_fixedsize(nursery_size):
         return nursery_size // 2 - 1
 
-    def get_young_var_basesize(self, nursery_size):
+    @staticmethod
+    def get_young_var_basesize(nursery_size):
         return nursery_size // 4 - 1
 
     def is_in_nursery(self, addr):



More information about the Pypy-commit mailing list