Hello and welcome!
In this video session, we will discuss the basic memory layout of a process.
The different segments of a process are text segment, data segment, stack segment, and heap segment.
The data segment also contains initialized data segment and uninitialized data segment, also called
as BSS segment.
Let's discuss each of the memory segment in brief.
The text segment contains the code of the program that is executed.
This segment of memory cannot be written so that the code is not altered by any bad pointers.
This also means that the text segment is read only copy.
The initialized data segment contains global and static variables that are explicitly initialized with
the value in the code.
The uninitialized data segment contains global and static variables that are not explicitly initialized
in the code, so the system initializes all the values of the segment to zero.
The stack is a dynamically growing and shrinking segment containing local data, also called as the
stack frames of the function.
One stack frame is allocated for each function that are called. A stack
Frame stores the function's local variable and function arguments.
The heap is an area from which memory can be dynamically allocated at runtime.
In next video session, we will learn memory layout of a process in depth.
Thank you.