Data segment: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
Line 1:
In [[computing]], a '''data segment''' (often denoted '''.data''') is a portion of an [[object file]] or the corresponding [[address space]] of a program that contains initialized [[static variable]]s, that is, [[global variable]]s and [[static local variable]]s. The size of this segment is determined by the size of the values in the program's source code, and does not change at [[Run time (program lifecycle phase)|run time]].
 
The data segment is read/write, since the values of variables can be altered at run time. This is in contrast to the ''read-only data segment'' (''{{visible anchor|rodata}} segment'' or ''.rodata''), which contains static constants rather than variables; it also contrasts to the [[code segment]], also known as the text segment, which is read-only on many architectures. Uninitialized data, both variables and constants, is instead in the [[BSS segment]].