Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 29 Sep 2002 12:18:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 29 Sep 2002 12:18:47 -0400 Received: from hermes.fachschaften.tu-muenchen.de ([129.187.202.12]:50139 "HELO hermes.fachschaften.tu-muenchen.de") by vger.kernel.org with SMTP id ; Sun, 29 Sep 2002 12:18:46 -0400 Date: Sun, 29 Sep 2002 18:24:02 +0200 (CEST) From: Adrian Bunk X-X-Sender: bunk@mimas.fachschaften.tu-muenchen.de To: Andi Kleen cc: torvalds@transmeta.com, Subject: Re: [PATCH] Use __attribute__((malloc)) for gcc 3.2 In-Reply-To: <20020929152731.GA10631@averell> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 40 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/