Messages in this thread | | | From | "Peter T. Breuer" <> | Subject | Re: freeing a static after one use only? | Date | Fri, 18 Feb 2000 08:33:58 +0100 (MET) |
| |
"A month of sundays ago Mike Galbraith wrote:" > On Thu, 17 Feb 2000, Peter T. Breuer wrote: > > use it once and then throw it away > > vi://TheSource/include/linux/init.h/__initdata
Very promising ...
* For initialized data: * You should insert __initdata between the variable name and equal * sign followed by value, e.g.: * * static int init_variable __initdata = 0; * static char linux_logo[] __initdata = { 0x32, 0x36, ... }; * * For initialized data not at file scope, i.e. within a function, * you should use __initlocaldata instead, due to a bug in GCC 2.7.
I'll let you know if I get it to work. The compiler complains here.
static CrossRef uIndex[] __initlocaldata = { #include "all_config.data" { 0 , 0 }, };
setup.c: In function `init_module': setup.c:81: syntax error before `__initlocaldata'
(commenting out the __initlocaldata makes it all OK).
Peter
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |