1.

What Are Memory Segments?

Answer»

A segmented memory model divides the system memory into groups of independent segments referenced by pointers located in the segment REGISTERS. Each segment is used to contain a specific type of DATA. One segment is used to contain instruction codes, another segment stores the data elements, and a third segment keeps the program stack.

In the light of the above discussion, we can specify VARIOUS memory segments as −

  • Data segment − It is represented by .data section and the .bss. The .data section is used to declare the memory region, where data elements are stored for the program. This section cannot be expanded after the data elements are declared, and it REMAINS static throughout the program.
    The .bss section is also a static memory section that contains buffers for data to be declared later in the program. This buffer memory is zero-filled.
  • Code segment − It is represented by .text section. This DEFINES an area in memory that stores the instruction codes. This is also a fixed area.
  • Stack − This segment contains data values passed to functions and procedures within the program.

A segmented memory model divides the system memory into groups of independent segments referenced by pointers located in the segment registers. Each segment is used to contain a specific type of data. One segment is used to contain instruction codes, another segment stores the data elements, and a third segment keeps the program stack.

In the light of the above discussion, we can specify various memory segments as −



Discussion

No Comment Found