[pypy-svn] r63143 - pypy/trunk/pypy/module/gc

pedronis at codespeak.net pedronis at codespeak.net
Fri Mar 20 16:24:54 CET 2009


Author: pedronis
Date: Fri Mar 20 16:24:53 2009
New Revision: 63143

Modified:
   pypy/trunk/pypy/module/gc/interp_gc.py
Log:
(iko, pedronis)

perturb the obscure feature maybe for the better



Modified: pypy/trunk/pypy/module/gc/interp_gc.py
==============================================================================
--- pypy/trunk/pypy/module/gc/interp_gc.py	(original)
+++ pypy/trunk/pypy/module/gc/interp_gc.py	Fri Mar 20 16:24:53 2009
@@ -43,9 +43,11 @@
             lines = content.split("\n")
             for line in lines:
                 if line.startswith("VmSize:"):
+                    start = line.find(" ") # try to ignore tabs
+                    assert start > 0
                     stop = len(line) - 3
                     assert stop > 0
-                    result = int(line[len("VmSize:"):stop].strip(" ")) * 1024
+                    result = int(line[start:stop].strip(" ")) * 1024
                     return space.wrap(result)
     raise OperationError(space.w_RuntimeError,
                          space.wrap("can't estimate the heap size"))



More information about the Pypy-commit mailing list