Re: some char * optimizations in kernel

Ph. Marek (marek@mail.bmlv.gv.at)
Mon, 26 Feb 2001 08:00:53 +0100


>> Furthermore, in the "char *"-case the pointer is stored in memory.
>
>It has to be, no matter of optimalization level. Some other module
>might access that variable. You _could_ do static const char *..., but
>it would probably not help.
I know that the pointer is NEEDED (from the compilers pov); what I don't
know is whether it has any ill side-effects to change it to a char [].
Most of this stuff is a version-string outputted at initialization time and
is not needed any more (afaik) but, as you noted, sometimes it could be
used by modules.

IIRC it doesn't matter if a symbol points to a pointer or an array - the
symbol is resolved either way.
BUT, if there is something that absolutly EXPECTS this as a pointer - is
this replaced in memory by insmod/modprobe on every occasion?

Well, just as well, I'll make a patch and post it.

>> And, btw too, where can I find a maintainer of a specific file? eg., one of
>> these cases is in init/version.c which has "Copyright (C) 1992 Theodore
>> Ts'o" - but I have to guess it's tytso@valinux.com.
>> Is there something like Documentation/maintainers?
>
>It is something like MAINTAINERS in root.
Thanks!
-
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/