Messages in this thread | | | Date | Sun, 29 Sep 2002 18:24:02 +0200 (CEST) | From | Adrian Bunk <> | Subject | Re: [PATCH] Use __attribute__((malloc)) for gcc 3.2 |
| |
On Sun, 29 Sep 2002, Andi Kleen wrote:
>... > --- linux/include/linux/kernel.h 2002-09-29 16:54:34.000000000 +0200 > +++ linux-2.5.39-work/include/linux/kernel.h 2002-09-29 17:20:52.000000000 +0200 > @@ -47,6 +47,16 @@ void __might_sleep(char *file, int line) > #define might_sleep() do {} while(0) > #endif > > +#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 1 > +/* Function allocates new memory and return cannot alias with anything */ > +#define malloc_function __attribute__((malloc)) > +/* Never inline */ > +#define noinline __attribute__((noinline)) > +#else > +#define malloc_function > +#define noinline > +#endif > + >...
Why did you put it in kernel.h and not in compiler.h?
cu Adrian
--
You only think this is a free country. Like the US the UK spends a lot of time explaining its a free country because its a police state. Alan Cox
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |