Garrett D'Amore wrote: > Roland Mainz wrote: > > Adam Leventhal wrote: [snip] > >> Any bets on how much space this will save in the kernel (or anywhere)? My > >> guess is fewer than 100 bytes. > >> > > > > I think this is more in the range of megabytes since the kernel is full > > of duplicate strings. > > > > Quick look at the problem (kernel only): [snip (lots of useless numbers)] > > One potential concern. I know of certain bits of code where strings > like "$Id: some text$" are "edited" in place to form version numbers > from $Id$ and similar strings.
Erm, I hope the code uses those string literals as format arguments to |s*printf()|&co. ... > The places I can think of actually occur in kernel code! Grumpf... ;-( > I suspect that making this the default _might_ break a number of > things. It would be very, very helpful if we had compiler help to > _detect_ incorrect attempts to write to constant strings. I'm not sure > -xstrconst will give us the warnings to catch them before they become > bugs in the field. AFAIK Sun Workshop/Forte/Studio don't have such a warning... but AFAIK gcc has "-Wwrite-strings" ... :-) ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [EMAIL PROTECTED] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
