Re: [10 PATCHES] inline functions to avoid stack overflow

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mikulas Patocka
Date: Thursday, July 3, 2008 - 2:12 pm

On Tue, 1 Jul 2008, David Miller wrote:


The bad thing is that gcc can't use those slots optimally. If you have for 
example:

void f(int *x)
{
}

void g()
{
 	int a;
 	f(&a);
}

void h()
{
 	g();
}

Then the variable "a" can't be placed into one of the 6 implicit slots for 
g->f call (beacuse "f" may overwrite that slot). But "a" could be placed 
into one of those 6 slots that "h" allocates for "g" (because these slots 
are owned by "g"). But it isn't --- additional place is allocated for "a" 
:-/

Mikulas
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [10 PATCHES] inline functions to avoid stack overflow, Mikulas Patocka, (Wed Jun 25, 5:53 am)
Re: [10 PATCHES] inline functions to avoid stack overflow, Bart Van Assche, (Wed Jun 25, 11:32 pm)
Re: [10 PATCHES] inline functions to avoid stack overflow, Mikulas Patocka, (Tue Jul 1, 9:39 pm)
Re: [10 PATCHES] inline functions to avoid stack overflow, Mikulas Patocka, (Thu Jul 3, 2:12 pm)