[pypy-commit] stmgc c8-private-pages: try fixing demo_random2 (not sure if the seg0 requirement for allocate_old() is a good solution..)

Raemi noreply at buildbot.pypy.org
Mon Jan 19 11:06:58 CET 2015


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: c8-private-pages
Changeset: r1543:c24436ef205c
Date: 2015-01-19 11:04 +0100
http://bitbucket.org/pypy/stmgc/changeset/c24436ef205c/

Log:	try fixing demo_random2 (not sure if the seg0 requirement for
	allocate_old() is a good solution..)

diff --git a/c8/demo/demo_random2.c b/c8/demo/demo_random2.c
--- a/c8/demo/demo_random2.c
+++ b/c8/demo/demo_random2.c
@@ -463,7 +463,7 @@
         .next = NULL
     };
 
-    stm_start_inevitable_transaction(&stm_thread_local);
+    //stm_start_inevitable_transaction(&stm_thread_local);
     for (i = 0; i < PREBUILT_ROOTS; i++) {
         void* new_templ = malloc(sizeof(struct node_s));
         memcpy(new_templ, &prebuilt_template, sizeof(struct node_s));
@@ -476,7 +476,7 @@
             ((nodeptr_t)prebuilt_roots[i])->my_hash = hash;
         }
     }
-    stm_commit_transaction();
+    //stm_commit_transaction();
 }
 
 int main(void)
@@ -495,10 +495,11 @@
 
 
     stm_setup();
+    setup_globals();
+
     stm_register_thread_local(&stm_thread_local);
     stm_rewind_jmp_enterframe(&stm_thread_local, &rjbuf);
 
-    setup_globals();
 
     int thread_starts = NUMTHREADS * THREAD_STARTS;
     for (i = 0; i < NUMTHREADS; i++) {
diff --git a/c8/stm/setup.c b/c8/stm/setup.c
--- a/c8/stm/setup.c
+++ b/c8/stm/setup.c
@@ -118,6 +118,8 @@
     setup_nursery();
     setup_gcpage();
     setup_pages();
+
+    set_gs_register(get_segment_base(0));
 }
 
 void stm_teardown(void)


More information about the pypy-commit mailing list