Every process running on a machine is given the illusion that it is the only process running on it. And every process has a text, data and a stack section.
However, I fail to understand why the stack address of every process starts off at the same address(assuming that no kernel patches are installed and Address randomization is disabled).
Could someone point me towards a few reading resources or explain why this happens?
The heap grows up and the stack grows down, so on most operating systems the virtual space looks like:
Thus the location of the heap moves depending on the program size but the stack’s starting space is not dependent on anything about the program.