]> granicus.if.org Git - gc/commitdiff
2005--01-13 Hans Boehm <Hans.Boehm@hp.com> on behalf of Bruce Mitchener
authorhboehm <hboehm>
Sat, 14 Jan 2006 01:56:35 +0000 (01:56 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:35 +0000 (21:06 +0400)
* darwin_stop_world.c: Add vm_deallocate calls.

darwin_stop_world.c
doc/README.changes

index a7013ad867c4e7ebc9b3ff94d424c132a5ca7449..31c0f7d9ede9c48e835edc6add407e1bde13845d 100644 (file)
@@ -245,6 +245,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 */
 
@@ -390,6 +391,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);
       
  
@@ -461,6 +463,7 @@ void GC_start_world()
        }
       }
     }
+    vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
 #   if DEBUG_THREADS
      GC_printf("World started\n");
 #   endif
index 8a9b2af81e6d7a5b41b22c57bef1db665de57fbe..99a7118e6ac526378df0e3273b14a14e1377bab1 100644 (file)
@@ -2449,6 +2449,7 @@ Since gc7.0alpha5
  - Use #elif in the definitions of GET_MEM.
  - Overhaul porting.html.  Remove corresponding text from README.
  - Fix typo in DARWIN section of gcconfig.h.
+ - Fix Darwin thread memory leak.  (Thanks to Bruce Mitchener.)
   
 To do:
  - REDIRECT_MALLOC and threads combination is getting closer, but currently