What About The Stack?
This lesson addresses how segmentation works in the stack with the help of an example.
We'll cover the following
Thus far, we’ve left out one important component of the address space: the stack. The stack has been relocated to the physical address 28KB in the diagram above, but with one critical difference: it grows backwards (i.e., towards lower addresses). In physical memory, it “starts” at
The first thing we need is a little extra hardware support. Instead of just base and bounds values, the hardware also needs to know which way the segment grows (a bit, for example, that is set to when the segment grows in the positive direction, and for negative). Our updated view of what the hardware tracks is seen in the figure below:
Get hands-on with 1200+ tech skills courses.