From: Russell King <rmk@arm.linux.org.uk>
To: rusty@linuxcare.com.au (Rusty Russell)
Cc: tigran@veritas.com (Tigran Aivazian), linux-kernel@vger.kernel.org
Subject: Re: [PATCH] removal of "static foo = 0" from drivers/ide (test11)
Date: Sat, 25 Nov 2000 11:50:20 +0000 (GMT) [thread overview]
Message-ID: <200011251150.eAPBoLQ19031@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20001123110203.EB8A8813D@halfway.linuxcare.com.au> from "Rusty Russell" at Nov 23, 2000 10:01:53 PM
Rusty Russell writes:
> What irritates about these monkey-see-monkey-do patches is that if I
> initialize a variable to NULL, it's because my code actually relies on
> it; I don't want that information eliminated.
What information is lost? Unless you're working on a really strange
machine which does not zero bss, the following means the same from the
codes point of view:
static int foo = 0;
static int foo;
Both are initialised to zero by the time the code sees them for the
first time. Therefore there is no difference to the code in its reliance
on whether foo is zero. foo will be zero in both cases.
Also, any good programmer worth their skin should know this, and should
realise it. Therefore, there is no information loss about what value
that variable is expected to hold at initialisation time.
The only difference is the size on disk; if we go around setting every
bss variable to zero, the kernel/module data size will unnecessarily
huge.
We already argue about the extra couple of bytes that xx change to the
kernel/a module would cost. With these change, we save kilo-bytes in
disk space (which is important on some systems).
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King rmk@arm.linux.org.uk --- ---
| | | | http://www.arm.linux.org.uk/personal/aboutme.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-25 12:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-21 21:25 [PATCH] removal of "static foo = 0" from drivers/ide (test11) Bartlomiej Zolnierkiewicz
2000-11-21 22:55 ` J . A . Magallon
2000-11-21 23:04 ` Tigran Aivazian
2000-11-21 23:18 ` J . A . Magallon
2000-11-21 23:26 ` Tigran Aivazian
2000-11-21 23:30 ` J . A . Magallon
2000-11-23 11:01 ` Rusty Russell
2000-11-24 21:40 ` Vojtech Pavlik
[not found] ` <20001128031933.52DB981F5@halfway.linuxcare.com.au>
2000-11-28 8:59 ` Vojtech Pavlik
2000-11-24 23:13 ` J . A . Magallon
2000-11-25 12:01 ` Russell King
2000-11-25 11:50 ` Russell King [this message]
2000-11-25 23:56 ` Bartlomiej Zolnierkiewicz
2000-11-22 0:09 ` Jeff Garzik
2000-11-22 11:40 ` Russell King
-- strict thread matches above, loose matches on Subject: below --
2000-11-28 20:58 David Hinds
2000-11-28 21:08 ` Tigran Aivazian
2000-11-28 23:53 ` Peter Samuelson
2000-11-29 3:23 ` Keith Owens
2000-11-29 3:35 ` Peter Samuelson
2000-11-29 7:48 ` Tigran Aivazian
2000-11-29 14:00 ` Peter Samuelson
2000-11-29 14:08 ` Tigran Aivazian
2000-11-29 16:16 Darryl Miles
2000-11-29 23:54 ` Russell King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200011251150.eAPBoLQ19031@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@linuxcare.com.au \
--cc=tigran@veritas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox