From: hboehm Date: Sat, 14 Jan 2006 01:56:35 +0000 (+0000) Subject: 2005--01-13 Hans Boehm on behalf of Bruce Mitchener X-Git-Tag: gc7_0alpha7~82 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02f70da8c8aba358322ef6e9c8d69cc492b4d9c6;p=gc 2005--01-13 Hans Boehm on behalf of Bruce Mitchener * darwin_stop_world.c: Add vm_deallocate calls. --- diff --git a/darwin_stop_world.c b/darwin_stop_world.c index a7013ad8..31c0f7d9 100644 --- a/darwin_stop_world.c +++ b/darwin_stop_world.c @@ -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 diff --git a/doc/README.changes b/doc/README.changes index 8a9b2af8..99a7118e 100644 --- a/doc/README.changes +++ b/doc/README.changes @@ -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