User: Password:
|
|
Subscribe / Log in / New account

Memory part 6: More things programmers can do

Memory part 6: More things programmers can do

Posted Nov 1, 2007 14:06 UTC (Thu) by cruff (subscriber, #7201)
Parent article: Memory part 6: More things programmers can do

Err, what's wrong with using the standard compliant

    const int bar = 2

instead of attributes?


(Log in to post comments)

Memory part 6: More things programmers can do

Posted Nov 1, 2007 15:42 UTC (Thu) by madscientist (subscriber, #16861) [Link]

Not sure exactly which part of the article you're talking about, but Ulrich does say:

> If the programmer marks the variables correctly with const, the tool chain
> will move the variables away from the normal variables into the .rodata
> (read-only data) or .data.rel.ro (read-only after relocation) section [...]
> No other special action is required. If, for some reason, variables cannot
> be marked correctly with const, the programmer can influence their
> placement by assigning them to a special section.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds