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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mikulas Patocka
Date: Wednesday, June 25, 2008 - 5:53 am

On Wed, 25 Jun 2008, Helge Hafting wrote:


So, ask gcc developers to do kernel-specific ABI with only 128-byte stack 
frame.

BTW. could some gcc developer explain the reason for additional 16-bytes 
on stack on sparc64? 64-bit ABI mandates 176 bytes, but gcc allocates 192 
bytes.

Even worse, gcc doesn't use these additional bytes. If you try this:

extern void f(int *i);
void g()
{
         int a;
         f(&a);
}

, it allocates additional 16 bytes for the variable "a" (so there's total 
208 bytes), even though it could place the variable into 48-byte 
ABI-mandated area that it inherited from the caller or into it's own 
16-byte padding that it made when calling "f".

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)