[Gc] Can GC return unused pages to the OS?

Boehm, Hans hans_boehm at hp.com
Wed Feb 18 10:02:14 PST 2004


You are right that this is currently only supported by Makefile.direct.
A patch to configure.in to support USE_MUNMAP would be welcome, but I
haven't gotten around to it yet.

This should have less cost than GC_dont_expand.  It returns memory to
the OS only if they haven't been used in a while.  It can probably be made 
a bit more aggressive by reducing UNMAP_THRESHOLD defined in allchblk.c.
If that turns out to be useful that knob could be made a bit more accessible.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Alec Orr
> Sent: Wednesday, February 18, 2004 8:22 AM
> To: Jeff Sturm
> Cc: gc at napali.hpl.hp.com
> Subject: Re: [Gc] Can GC return unused pages to the OS?
> 
> 
> 
> Sorry for the late reply.  Will run with this for a while.  
> This setting 
> is made in the Makefile.direct file correct?
> 
> Thank you,
> Alec
> 
> Jeff Sturm wrote:
> 
> > Have you tried building the collector with -DUSE_MUNMAP?
> > 
> > Jeff
> > 
> > On Mon, 16 Feb 2004, Alec Orr wrote:
> > 
> >>Some of our embedded device C applications have a few 
> operations which
> >>require a high one-time volume of memory, and then release 
> it.  These
> >>operations are scheduled, and intermittant (occur once 
> every few hours,
> >>or days).  Is there a way to explicitly force (or ask with strong
> >>language) the garbage collector to coalesce and return unused memory
> >>pages to the operating system?  It would be nice of this could be
> >>enabled/disabled using a toggle, but if that can't be done 
> - so be it.
> >>
> >>We realize there could be a high performance impact in doing this.
> >>We realize this may not be possible on some platforms.
> >>
> >>We already use the GC_dont_expand variable=1 , and 
> strategic calls to
> >>GC_gcollect().
> >>
> >>Thank you for your time,
> >>Alec Orr
> >>WBEM Solutions
> >>
> >>
> >>
> >>
> >>_______________________________________________
> >>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