OSDN Git Service

2006-05-09 Andrew Haley <aph@redhat.com>
[pf3gnuchains/gcc-fork.git] / boehm-gc / darwin_stop_world.c
index 22c76a8..c2a033d 100644 (file)
@@ -38,7 +38,7 @@ unsigned long FindTopOfStack(unsigned int stack_start) {
 #   if CPP_WORDSZ == 32
       __asm__ volatile("lwz    %0,0(r1)" : "=r" (frame));
 #   else
-      __asm__ volatile("ldz    %0,0(r1)" : "=r" (frame));
+      __asm__ volatile("ld     %0,0(r1)" : "=r" (frame));
 #   endif
 # endif
   } else {
@@ -249,6 +249,7 @@ void GC_push_all_stacks() {
 #     endif
       GC_push_all_stack(lo, hi); 
     } /* for(p=GC_threads[i]...) */
+    vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
 }
 #endif /* !DARWIN_DONT_PARSE_STACK */
 
@@ -392,6 +393,7 @@ void GC_stop_world()
        changes = result;
        prev_list = act_list;
        prevcount = listcount;
+        vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
       } while (changes);
       
  
@@ -463,6 +465,7 @@ void GC_start_world()
        }
       }
     }
+    vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
 #   if DEBUG_THREADS
      GC_printf0("World started\n");
 #   endif