[pypy-svn] r76850 - pypy/branch/markcompact/pypy/rpython/memory/gc
arigo at codespeak.net
arigo at codespeak.net
Fri Sep 3 12:57:58 CEST 2010
Author: arigo
Date: Fri Sep 3 12:57:55 2010
New Revision: 76850
Modified:
pypy/branch/markcompact/pypy/rpython/memory/gc/markcompact.py
Log:
Increase the default of min_next_collect_after.
Let it be configurable at run-time with the env
var PYPY_MARKCOMPACTGC_MIN.
Modified: pypy/branch/markcompact/pypy/rpython/memory/gc/markcompact.py
==============================================================================
--- pypy/branch/markcompact/pypy/rpython/memory/gc/markcompact.py (original)
+++ pypy/branch/markcompact/pypy/rpython/memory/gc/markcompact.py Fri Sep 3 12:57:55 2010
@@ -75,7 +75,7 @@
# a big mmap. The process does not actually consume that space until
# needed, of course.
TRANSLATION_PARAMS = {'space_size': int((1 + 15.0/16)*1024*1024*1024),
- 'min_next_collect_after': 4*1024*1024} # 4MB
+ 'min_next_collect_after': 16*1024*1024} # 16MB
malloc_zero_filled = False
inline_simple_malloc = True
@@ -111,9 +111,12 @@
return next
def setup(self):
- envsize = max_size_from_env()
+ envsize = read_from_env('PYPY_MARKCOMPACTGC_MAX')
if envsize >= 4096:
self.space_size = envsize & ~4095
+ mincollect = read_from_env('PYPY_MARKCOMPACTGC_MIN')
+ if mincollect >= 4096:
+ self.min_next_collect_after = mincollect
#self.program_start_time = time.time()
self.space = llarena.arena_malloc(self.space_size, False)
@@ -675,6 +678,3 @@
class CannotAllocateGCArena(Exception):
pass
-
-def max_size_from_env():
- return read_from_env('PYPY_MARKCOMPACTGC_MAX')
More information about the Pypy-commit
mailing list