[Gc] 6.6 on Mac OS X 10.3.9

Cody Pisto cody at hpcs.com
Sat Sep 24 09:37:20 PDT 2005


No, the garbage collected heap according to GC_PRINT_STATS does not grow.

If you would like, I can arrange shell access to an OS X machine.

-Cody

Boehm, Hans wrote:
> At this point, the information posted to this thread looks more and more
> puzzling to me.  Is the garbage-collected heap   growing (as reported to
> GC_PRINT_STATS)?  If so, why is gctest passing?
> 
> If not, I have no idea where the memory is being allocated.  The program
> below should stop requesting memory on very short order.
> 
> Unfortunately, I no longer have access to a MacOS X box.
> 
> Hans
> 
> 
>>-----Original Message-----
>>From: gc-bounces at napali.hpl.hp.com 
>>[mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Cody Pisto
>>Sent: Tuesday, September 20, 2005 10:14 PM
>>To: Stephane Epardaud
>>Cc: gc at napali.hpl.hp.com; Andrew Begel
>>Subject: Re: [Gc] 6.6 on Mac OS X 10.3.9
>>
>>
>>I just wanted to confirm that Stephane is correct, even 
>>without threads, 
>>the GC is not collecting anything on OS X at all.
>>
>>I will look into a gdb session to track it down as soon as I 
>>have some 
>>spare time.
>>
>>-Cody
>>
>>Stephane Epardaud wrote:
>>
>>>Hi,
>>>
>>>I was the one reporting the original problem.
>>>Same here: it keeps growing, only your test case is not 
>>
>>minimal: there 
>>
>>>is no need to create any pthread in order to show the memory 
>>>consumption growing: just
>>>this:
>>>
>>>int main(int argc, char **argv){
>>>  GC_init();
>>>  while(1){
>>>    GC_malloc(1024);
>>>  }
>>>}
>>>
>>>And that leaks. I left it there (sorry not to have followed 
>>
>>through) 
>>
>>>due to lack of time and unbearably painful and slow Mac machine 
>>>access.
>>>
>>>Cody Pisto wrote:
>>>
>>>
>>>>The attached sample seems to reliably recreate the problem for me,
>>>>
>>>>just build it with gcc -o testgc testgc.c -lgc
>>>>
>>>>and run it from a terminal like so:
>>>>
>>>>GC_DUMP_REGULARLY=1 ./testgc
>>>>
>>>>Hope that helps,
>>>>
>>>>-Cody
>>>>
>>>>
>>>>Andrew Begel wrote:
>>>>
>>>>
>>>>
>>>>>The output you show below looks legit to me. It looks like it's
>>>>>getting all your threads, right?
>>>>>
>>>>>At this point, we probably have to see your program. Got a 
>>
>>small test
>>
>>>>>case that someone else with a Mac can try?
>>>>>
>>>>>Andrew
>>>>>
>>>>
>>>>
>>>>------------------------------------------------------------
>>
>>----------
>>
>>>>--
>>>>
>>>>#include <stdio.h>
>>>>#include <stdlib.h>
>>>>#include <unistd.h>
>>>>#include <pthread.h>
>>>>
>>>>#define GC_THREADS
>>>>#define GC_REDIRECT_TO_LOCAL
>>>>#include "gc.h"
>>>>#include "gc_local_alloc.h"
>>>>
>>>>#define NR_THREADS 5
>>>>
>>>>static void *
>>>>handle_request (void *arg)
>>>>{
>>>>   void *test;
>>>>   
>>>>   for (;;)
>>>>   {
>>>>       test = GC_malloc(4096);
>>>>       
>>>>       sleep(30);
>>>>       
>>>>       test = NULL;
>>>>       
>>>>       GC_gcollect();
>>>>   }
>>>>}
>>>>
>>>>
>>>>int
>>>>main (int argc, char **argv)
>>>>{
>>>>   int i;
>>>>   pthread_t threads[NR_THREADS];
>>>>
>>>>   GC_INIT();
>>>>   
>>>>   /* spawn the processing threadpool */
>>>>   for (i = 1; i < NR_THREADS; i++) {
>>>>       pthread_create(&threads[i], NULL, handle_request, NULL);
>>>>   }
>>>>
>>>>   handle_request(NULL);
>>>>
>>>>   exit(0);
>>>>   return 0; /* not reached */
>>>>}
>>>>
>>>>
>>>>------------------------------------------------------------
>>
>>----------
>>
>>>>--
>>>>
>>>>_______________________________________________
>>>>Gc mailing list
>>>>Gc at linux.hpl.hp.com 
>>>>http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>>>
>>>_______________________________________________
>>>Gc mailing list
>>>Gc at linux.hpl.hp.com 
>>>http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>>>
>>>
>>
>>_______________________________________________
>>Gc mailing list
>>Gc at linux.hpl.hp.com 
>>http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
>>
> 
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 
> 


More information about the Gc mailing list