Re: [PATCH 2/3] Free large chunks in ggc

2011-10-23 Thread Andi Kleen
On Sun, Oct 23, 2011 at 12:24:46PM +0200, Richard Guenther wrote: > >> space in the free list afterward we free it back on the next GC cycle. > >> Then if there's a malloc or other allocator later it can grab > >> the address space we freed. > >> > >> That was done to address your earlier concern.

Re: [PATCH 2/3] Free large chunks in ggc

2011-10-23 Thread Richard Guenther
On Sun, Oct 23, 2011 at 12:23 PM, Richard Guenther wrote: > On Fri, Oct 21, 2011 at 8:30 PM, Andi Kleen wrote: >>> > diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c >>> > index ba88e3f..eb0eeef 100644 >>> > --- a/gcc/ggc-page.c >>> > +++ b/gcc/ggc-page.c >>> > @@ -972,6 +972,54 @@ release_pages (voi

Re: [PATCH 2/3] Free large chunks in ggc

2011-10-23 Thread Richard Guenther
On Fri, Oct 21, 2011 at 8:30 PM, Andi Kleen wrote: >> > diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c >> > index ba88e3f..eb0eeef 100644 >> > --- a/gcc/ggc-page.c >> > +++ b/gcc/ggc-page.c >> > @@ -972,6 +972,54 @@ release_pages (void) >> >   page_entry *p, *start_p; >> >   char *start; >> >   size

Re: [PATCH 2/3] Free large chunks in ggc

2011-10-21 Thread Andi Kleen
> > diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c > > index ba88e3f..eb0eeef 100644 > > --- a/gcc/ggc-page.c > > +++ b/gcc/ggc-page.c > > @@ -972,6 +972,54 @@ release_pages (void) > >   page_entry *p, *start_p; > >   char *start; > >   size_t len; > > +  size_t mapped_len; > > +  page_entry *next, *

Re: [PATCH 2/3] Free large chunks in ggc

2011-10-21 Thread Richard Guenther
On Fri, Oct 21, 2011 at 7:52 AM, Andi Kleen wrote: > From: Andi Kleen > > This implements the freeing back of large chunks in the ggc madvise path > Richard Guenther asked for.  This way on systems with limited > address space malloc() and other allocators still have > a chance to get back at som

[PATCH 2/3] Free large chunks in ggc

2011-10-20 Thread Andi Kleen
From: Andi Kleen This implements the freeing back of large chunks in the ggc madvise path Richard Guenther asked for. This way on systems with limited address space malloc() and other allocators still have a chance to get back at some of the memory ggc freed. The fragmented pages are still just