Re: [PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

2011-09-18 Thread Dodji Seketeli
? OK, updated the patch below accordingly. OK with that change if nobody else has comments this week. Thanks. Below is the updated patch. From: Dodji Seketeli do...@redhat.com Date: Tue, 17 May 2011 16:48:01 +0200 Subject: [PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

Re: [PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

2011-09-18 Thread Laurynas Biveinis
2011/9/17 Dodji Seketeli do...@redhat.com: OK, so the patch below extracts a public ggc_alloced_size_for_request function from the different implementations of the ggc allocator's interface, and lets new_linemap use that. libcpp/        * include/line-map.h (struct

Re: [PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

2011-09-17 Thread Dodji Seketeli
: [PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs This patch basically arranges for the allocation size of line_map buffers to be as close as possible to a power of two. This *significantly* decreases peak memory consumption as (macro) maps are numerous and stay live during all

Re: [PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

2011-09-17 Thread Jason Merrill
On 09/17/2011 07:08 AM, Dodji Seketeli wrote: OK, so the patch below extracts a public ggc_alloced_size_for_request function from the different implementations of the ggc allocator's interface, and lets new_linemap use that. Maybe ggc_round_alloc_size? OK with that change if nobody else has

Re: [PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

2011-09-12 Thread Jason Merrill
On 07/16/2011 10:37 AM, Dodji Seketeli wrote: Ideally, I'd prefer some parts of this patch to be integrated into the memory allocator. That is, I'd like to see the memory allocator have an interface that returns the actual size of memory it has allocated. This would help client code like this

[PATCH 7/7] Reduce memory waste due to non-power-of-2 allocs

2011-07-16 Thread Dodji Seketeli
This patch basically arranges for the allocation size of line_map buffers to be as close as possible to a power of two. This *significantly* decreases peak memory consumption as (macro) maps are numerous and stay live during all the compilation. Ideally, I'd prefer some parts of this patch to be