Sometimes it is used:
find usr/src/ -name "Make*" | xargs grep -i strconst
Alexander
On Tue, 6 Mar 2007, Garrett D'Amore wrote:
[EMAIL PROTECTED] wrote:
On Tue, Mar 06, 2007 at 04:37:59PM +0100, [EMAIL PROTECTED] wrote:
Ok. I'll bite... what is a "tail merging string". And does this save
space (as I think the name implies)?
Suppose you have two strings:
Permission Denied.
You're not authorized. Permission Denied.
If the strings can be modified, you need to store both.
Any bets on how much space this will save in the kernel (or anywhere)? My
guess is fewer than 100 bytes.
tail mergiung yes, duplicate supressing quite a few more.
Once duplicates are suppressed, someone could go and look at the
generated string table, and I bet we could save quite a bit more by
consolidating "near matches" (different amounts of space,
capitalization, etc.)
Taken across the sum of userland, I expect that the results could be
quite significant.
FWIW, I think I agree with Roland on this ... making -xstrconst the
default in ON builds is probably an excellent idea.
On the other hand, I'm not entirely sure that this should be a compiler
default, or at least not unless an optimization of -xO2 or larger is
used. When doing certain kinds of debugging, it can be useful to
identify the location of a string (such as when its address appears in a
register dump), and having strings merged reduces the utility of this, I
think.
-- Garrett
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code