This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reduce alloca 'ted memory in dwarf2out.c



On Feb 13, 2005, at 7:53 PM, Marcin Dalecki wrote:



On 2005-02-14, at 00:40, Daniel Jacobowitz wrote:


On Mon, Feb 14, 2005 at 12:36:15AM +0100, Christophe Jaillet wrote:
Description : in gcc/dwarf2out.c, some memory allocated with alloca request
too much. Just ask for what is needed


Note : the first part of the patch assume that %x of comdat_symbol_number is
less than 10 bytes
The second part is always OK.

What benefit does this have? It's on the stack and not long-lived...

Stacks are surprisingly small those days to reduce virtual memory scatter/pressure.
Watch the apple branch playing rlimit games in toplevel.c due to this. The less is used
the better.

Actually the reason Apple's branch does that is because the default on pre jag was
only 512K which causes some semi big programs to fail when going though the GC.


Now Jag and beyond is 8M which is nice.

-- Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]