[pypy-svn] r36121 - pypy/dist/pypy/rpython/memory/test
arigo at codespeak.net
arigo at codespeak.net
Wed Jan 3 16:27:18 CET 2007
Author: arigo
Date: Wed Jan 3 16:27:16 2007
New Revision: 36121
Modified:
pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py
Log:
Tweaks to this test file.
Modified: pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py (original)
+++ pypy/dist/pypy/rpython/memory/test/test_transformed_gc.py Wed Jan 3 16:27:16 2007
@@ -234,6 +234,7 @@
class gcpolicy(gc.FrameworkGcPolicy):
class transformerclass(framework.FrameworkGCTransformer):
GC_PARAMS = {'start_heap_size': 4096 }
+ root_stack_depth = 200
gcname = "framework"
def heap_usage(self, statistics):
@@ -644,8 +645,10 @@
class gcpolicy(gc.StacklessFrameworkGcPolicy):
class transformerclass(stacklessframework.StacklessFrameworkGCTransformer):
GC_PARAMS = {'start_heap_size': 4096 }
+ root_stack_depth = 200
def test_x_become(self):
+ from pypy.rlib import objectmodel
S = lltype.GcStruct("S", ('x', lltype.Signed))
def f():
x = lltype.malloc(S)
@@ -656,6 +659,9 @@
llop.gc_x_become(lltype.Void,
llmemory.cast_ptr_to_adr(x),
llmemory.cast_ptr_to_adr(y))
+ # keep 'y' alive until the x_become() is finished, because in
+ # theory it could go away as soon as only its address is present
+ objectmodel.keepalive_until_here(y)
return z.x
run = self.runner(f)
res = run([])
@@ -672,3 +678,4 @@
class transformerclass(framework.FrameworkGCTransformer):
from pypy.rpython.memory.gc import SemiSpaceGC as GCClass
GC_PARAMS = {'space_size': 4096 }
+ root_stack_depth = 200
More information about the Pypy-commit
mailing list