This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Boehm GC memory leak on Darwin


Thanks Sandro, I have checked this in to the trunk and the 4.1 branch.

It would be great to get a copyright assignment form from you so that we can check in the rest of your Darwin/x86 patches. Have you started the copyright assignment process? If not, the form to do so can be found here:

http://gcc.gnu.org/ml/gcc/2003-06/msg02298.html

Bryce


Sandro Tolaini wrote:
I'm sending this note again since I have been caught in this bug once more. Under Darwin (PPC and Intel) there is a serious memory leak at every Boehm GC cycle. See discussion and patch here:

http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2005-December/001071.html


I think that the patch should be applied to every maintained branch.


Please maintainers, check this in!

2006-04-11  Bryce McKinlay  <mckinlay@redhat.com>

        * darwin_stop_world.c (GC_push_all_stacks, GC_stop_world,
        GC_start_world): Call vm_deallocate to free act_list. Fix from
        Bruce Mitchener.

Index: darwin_stop_world.c
===================================================================
--- darwin_stop_world.c	(revision 112716)
+++ darwin_stop_world.c	(working copy)
@@ -155,6 +155,7 @@
 #     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);
 }
 
 static mach_port_t GC_mach_handler_thread;
@@ -297,6 +298,7 @@
 	changes = result;
 	prev_list = act_list;
 	prevcount = listcount;
+        vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
       } while (changes);
       
  
@@ -368,6 +370,7 @@
 	}
       }
     }
+    vm_deallocate(current_task(), (vm_address_t)act_list, sizeof(thread_t) * listcount);
 #   if DEBUG_THREADS
      GC_printf0("World started\n");
 #   endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]