Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. A data segment is one of the sections of a program in an object file or in memory, which contains the global variables and static variables that are initialized by the programmer. It has a fixed size, since all of the data in this section is set by the programmer before the program ...Full description
Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. A data segment is one of the sections of a program in an object file or in memory, which contains the global variables and static variables that are initialized by the programmer. It has a fixed size, since all of the data in this section is set by the programmer before the program is loaded. However, it is not read-only, since the values of the variables can be altered at runtime. This is in contrast to the Rodata (constant, read-only data) section, as well as the code segment (also known as text segment). In the PC architecture there are four basic read-write memory regions in a program: Stack, Data, BSS, and Heap. Sometimes the data, BSS, and heap areas are collectively referred to as the "data segment".