On 8/24/2020 1:20 PM, Dan Cross wrote:
On Mon, Aug 24, 2020 at 1:08 PM John Cowan <cowan@ccil.org> wrote:
On Mon, Aug 24, 2020 at 12:00 PM Dan Cross <crossd@gmail.com> wrote:
Stacks may be at the top of the user portion of the address space; but I'd have to double check the details.

That's always true on the PDP-11 and Vax, no matter what the OS, because the processor architecture (which has pre-increment and post-decrement instructions, but not their counterparts) makes anything but a downward-growing stack unmanageable.

Ah, but if one has a fixed-size stack that cannot be extended, one can put it anywhere one wants in the virtual address space. E.g., right after the program text segment or whatever (effectively using the text as a guard to detect stack overflow). I don't know why one would want to do that, except that it makes freeing the virtual address space slightly simpler when the process exits, but the point is that the Unix choice isn't the only way. That said, stacks and data growing toward each gives the maximum amount of flexibility.

In OSes without virtual memory like RSX-11[ABC], RT-11, and mini-Unix/LSX-11, what counts as the top naturally varies.


On TOPS-10, I got into the habit of putting the PDL at the end of the lowseg. If it ran over, it would die.

ak