lkml.org 
[lkml]   [2002]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.076 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site