Brain Dump

Data Segment

Tags
comp-arch

Is the writable area of a processes memory space where the processes local variables and other data is kept. This is divided into two sub-parts: The initialised data segment and the uninitialised data segment.

Initialised Data Segment

Containing all of a programs global and static variables. This starts at a fixed size because the size of all these variables can be determined at compile time.

The values for these variables are initially stored within the read-only memory (typically within the code segment) and are copied into the data segment during the start-up routine of the program.

Uninitialised Data Segment

This contains the remaining global and static variables which are implicitly zeroed out. This is defined as its own section to speed process start-up times. This section is further divided into a readable and writable section.

Links to this note