From: Joe Perches <joe@perches.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: John Daiker <daikerjohn@gmail.com>,
kernel-janitors@vger.kernel.org, aia21@cantab.net,
linux-ntfs-dev@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] NTFS: Change string pointers to string constants.
Date: Mon, 07 Dec 2009 17:47:13 -0800 [thread overview]
Message-ID: <1260236833.3215.237.camel@Joe-Laptop.home> (raw)
In-Reply-To: <C1806924-DE57-4FBA-A67C-85C618FE6639@cam.ac.uk>
On Tue, 2009-12-08 at 00:57 +0000, Anton Altaparmakov wrote:
> Can you please explain the rational for making this change?
Perhaps it's not worth much, but it saves a pointer reference.
$ cat pointer.c
#include <string.h>
#include <stdio.h>
int main (int argc, char** argv)
{
static const char *foo = "abcdefg";
printf("%s\n", foo);
return 0;
}
$ gcc -c pointer.c
$ size pointer.o
text data bss dec hex filename
37 4 0 41 29 pointer.o
$ cat reference.c
#include <string.h>
#include <stdio.h>
int main (int argc, char** argv)
{
static const char foo[] = "abcdefg";
printf("%s\n", foo);
return 0;
}
$ gcc -c reference.c
$ size reference.o
text data bss dec hex filename
36 0 0 36 24 reference.o
next prev parent reply other threads:[~2009-12-08 1:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 2:53 John Daiker
2009-12-08 0:57 ` Anton Altaparmakov
2009-12-08 1:47 ` Joe Perches [this message]
2009-12-08 19:16 ` John Daiker
2009-12-09 14:59 ` Marcin Slusarz
2009-12-09 15:07 ` walter harms
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=1260236833.3215.237.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=aia21@cam.ac.uk \
--cc=aia21@cantab.net \
--cc=daikerjohn@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntfs-dev@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®