Re: Regarding the Future of ELKS

Alan Cox
2007-05-06T18:37:14Z

> (Interestingly, putting the stack at the *bottom* of the data is exactly what
> I did with the CP/M platform. In my case it was to make it easier for brk() to
> tell where the end of the program area was. Strictly it shouldn't be necessary
> for any platform to have a defined position for the stack; parameters can be
> passed to the executable via registers, and then setting up the stack can be a
> pure user-mode thing. I don't know if anyone actually does this, though.)

Not in Unix because of the rlimit rules for stack size, and also even
more importantly because you could in theory take a signal on your first
instruction, which would need to stack stuff.

> Can't comment on binary formats, but apparently someone is working on a real
> VM for Minix 3, which should allow brk() to be actually useful. I'm hoping
> that I can wait until then before porting the ACK's new build system...

Doesn't need a VM, basic swapping will do, thats all ELKS has. It uses
the V7 Unix algorithm

if can grow data segment
grow it
else
swap out
endif

(and it'll swap back into a suitable space, as well as the swap tending
to punish memory hogs)