Author: Remi Meier <[email protected]>
Branch:
Changeset: r501:cdd017855adc
Date: 2013-08-27 18:45 +0200
http://bitbucket.org/pypy/stmgc/changeset/cdd017855adc/
Log: stubs should have a thread assigned to them
diff --git a/c4/extra.c b/c4/extra.c
--- a/c4/extra.c
+++ b/c4/extra.c
@@ -57,6 +57,8 @@
stub->h_original = (revision_t)obj;
}
+ STUB_THREAD(stub) = d->public_descriptor;
+
result = (intptr_t)stub;
spinlock_release(d->public_descriptor->collection_lock);
stm_register_integer_address(result);
diff --git a/c4/test/test_nursery.py b/c4/test/test_nursery.py
--- a/c4/test/test_nursery.py
+++ b/c4/test/test_nursery.py
@@ -361,3 +361,10 @@
def test_collect_soon():
lib.stmgc_minor_collect_soon()
nalloc(HDR)
+
+
+# def test_out_of_memory():
+# import sys
+# size = sys.maxint - 3
+# p = lib.stm_allocate(size, 111)
+# assert p == ffi.NULL
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit