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

2011-10-19 Thread Jan Hubicka
> Why? For one, such allocations are very rare (you only get them when > a single GC allocation requests > page of memory, like perhaps a string > literal over 4KB or similar or function call with over 1000 arguments etc.). > And if they are unlikely to be reused, not munmapping them means wasting

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

2011-10-19 Thread Jakub Jelinek
On Wed, Oct 19, 2011 at 04:37:45PM +0200, Andi Kleen wrote: > > If the size to free is smaller than the quirk size, then it has the very > > undesirable effect that with using GC only you might run unnecessarily out > > of virtual address space, because it allocates pages in 2MB chunks, but > > if

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

2011-10-19 Thread Andi Kleen
> If the size to free is smaller than the quirk size, then it has the very > undesirable effect that with using GC only you might run unnecessarily out > of virtual address space, because it allocates pages in 2MB chunks, but > if they are released in 1MB chunks, those released chunks will never be

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

2011-10-19 Thread Jakub Jelinek
On Wed, Oct 19, 2011 at 08:40:08AM +0200, 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 ba