[Issue 2642] .init contains zeroes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 3 00:05:29 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2642


maxmo at pochta.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement




------- Comment #2 from maxmo at pochta.ru  2009-02-03 02:05 -------
Other possible optimizations:
1. Move zero memory to bss section and zero it at startup. Not only .inits
contain zeroes, all static data does.
2. If zero data is invariant, different instances of this data can refer to the
same memory location, though, if programmer casts one of these pointers to
mutable data and overwrite it, this will cause disaster :)


-- 



More information about the Digitalmars-d-bugs mailing list