Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1467789
| From | "Luck, Tony" <tony.luck@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] skx_edac: Move a few hundred bytes to text from data using const |
| Date | 2016-08-22 18:50 +0200 |
| Message-ID | <s90A9-iZ-1@gated-at.bofh.it> (permalink) |
| References | <s8KYp-7hH-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Aug 21, 2016 at 05:02:41PM -0700, Joe Perches wrote: > Marking arrays as const makes for smaller data. Joe, "a few hundred" seems to be exaggeration. Before: $ size drivers/edac/skx_edac.ko text data bss dec hex filename 8435 1024 24 9483 250b drivers/edac/skx_edac.ko After: $ size drivers/edac/skx_edac.ko text data bss dec hex filename 8531 944 24 9499 251b drivers/edac/skx_edac.ko so "data" was reduced by 80 bytes, but "text" went up by 96. Net increase of 16 (perhaps because some padding for alignment???) Making read-only data const is a good idea in general, but do we want to do it if it *increases* kernel footprint? -Tony
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] skx_edac: Move a few hundred bytes to text from data using const Joe Perches <joe@perches.com> - 2016-08-22 02:10 +0200
Re: [PATCH] skx_edac: Move a few hundred bytes to text from data using const "Luck, Tony" <tony.luck@intel.com> - 2016-08-22 18:50 +0200
Re: [PATCH] skx_edac: Move a few hundred bytes to text from data using const Joe Perches <joe@perches.com> - 2016-08-22 19:00 +0200
csiph-web