[pypy-svn] r24560 - pypy/dist/pypy/rpython/memory/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Mon Mar 20 00:09:32 CET 2006
Author: cfbolz
Date: Mon Mar 20 00:09:30 2006
New Revision: 24560
Modified:
pypy/dist/pypy/rpython/memory/test/test_gc.py
Log:
use small chunk sizes for the tests
Modified: pypy/dist/pypy/rpython/memory/test/test_gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/test/test_gc.py (original)
+++ pypy/dist/pypy/rpython/memory/test/test_gc.py Mon Mar 20 00:09:30 2006
@@ -7,6 +7,7 @@
from pypy.rpython.memory.gc import GCError, MarkSweepGC, SemiSpaceGC
from pypy.rpython.memory.gc import DeferredRefcountingGC, DummyGC
from pypy.rpython.memory.support import AddressLinkedList, INT_SIZE, CHUNK_SIZE, FreeList
+from pypy.rpython.memory import support
from pypy.rpython.memory.lladdress import raw_malloc, raw_free, NULL
from pypy.rpython.memory.simulator import MemorySimulatorError
from pypy.rpython.memory import gclltype
@@ -28,9 +29,11 @@
py.log.setconsumer("llinterp frame", stdout_ignore_ll_functions)
py.log.setconsumer("llinterp operation", None)
gclltype.prepare_graphs_and_create_gc = gclltype.create_gc
+ support.CHUNK_SIZE = 1
def teardown_module(mod):
gclltype.prepare_graphs_and_create_gc = gclltype.create_no_gc
+ support.CHUNK_SIZE = CHUNK_SIZE
class TestMarkSweepGC(object):
def setup_class(cls):
@@ -97,7 +100,7 @@
class TestMarkSweepGCRunningOnLLinterp(TestMarkSweepGC):
def setup_class(cls):
- AddressLinkedList.unused_chunks = FreeList(CHUNK_SIZE + 2) # 'leaks' but well
+ AddressLinkedList.unused_chunks = FreeList(3) # 'leaks' but well
cls.prep_old = gclltype.prepare_graphs_and_create_gc
gclltype.prepare_graphs_and_create_gc = gclltype.create_gc_run_on_llinterp
def teardown_class(cls):
@@ -112,7 +115,7 @@
class TestSemiSpaceGCRunningOnLLinterp(TestMarkSweepGC):
def setup_class(cls):
- AddressLinkedList.unused_chunks = FreeList(CHUNK_SIZE + 2) # 'leaks' but well
+ AddressLinkedList.unused_chunks = FreeList(3) # 'leaks' but well
cls.prep_old = gclltype.prepare_graphs_and_create_gc
gclltype.prepare_graphs_and_create_gc = gclltype.create_gc_run_on_llinterp
gclltype.use_gc = SemiSpaceGC
@@ -132,7 +135,7 @@
class TestDeferredRefcountingGCRunningOnLLinterp(TestMarkSweepGC):
def setup_class(cls):
- AddressLinkedList.unused_chunks = FreeList(CHUNK_SIZE + 2) # 'leaks' but well
+ AddressLinkedList.unused_chunks = FreeList(3) # 'leaks' but well
cls.prep_old = gclltype.prepare_graphs_and_create_gc
gclltype.prepare_graphs_and_create_gc = gclltype.create_gc_run_on_llinterp
gclltype.use_gc = DeferredRefcountingGC
@@ -151,7 +154,7 @@
class TestDummyGCRunningOnLLinterp(TestMarkSweepGC):
def setup_class(cls):
- AddressLinkedList.unused_chunks = FreeList(CHUNK_SIZE + 2) # 'leaks' but well
+ AddressLinkedList.unused_chunks = FreeList(3) # 'leaks' but well
cls.prep_old = gclltype.prepare_graphs_and_create_gc
gclltype.prepare_graphs_and_create_gc = gclltype.create_gc_run_on_llinterp
gclltype.use_gc = DummyGC
More information about the Pypy-commit
mailing list