Tuesday, May 13, 2008

memory segment

Data Segment - Global +static data which are initialised to non-zero values.

Bss - Global +static data which are initialised to zero by default.

Heap -Dynamically allocated.

Stack - Local or Auto variables

Apart from all the discussions, i read one article where there will be compiler documents which comes along with the compiler which specifies where these segments are created and how they are used.

Usually, the compiler used by intel processors contain a code segment ,data segment.

Where in the code segment is the read only area.
Data segment in turn contains stack and heap. Where heap grows from bottom to top and stack grows from top to bottom of DS.

No comments: