Re: the memory model being used in elks?

[email protected] Sun, 10 May 2015 23:19:44 +0200
Newsgroups org.kernel.vger.linux-8086
Message-ID <[email protected]>
On Sun, May 10, 2015 at 09:27:44PM +0100, Alan Cox wrote:
> On Sun, 10 May 2015 20:40:27 +0200
> [email protected] wrote:
> > I see, a minix-like static allocation (I'm guessing this is needed
> > because ELKS does not yet handle overlapping segments between different
> > processes so it does not want to allocate a whole segment to each process
> > per default?).
> 
> Classic Unix defines the memory map as
> 
>    <--- Data ---><--- BSS ---> | <--- Space ---> | <--- Stack --- >
> 
> Where the upper divide is SP and the lower one is set by brk() or sbrk().
> The space in the middle doesn't all really exist if you have an MMU with
> any kind of sane paging system.

Even without MMU overlapping 8086 segments allow the use of this <-Space->
for stack or data+bss of other processes. Wonder if/how this is handled
in elks (lacking the time to Use-The-Source...)

> If you have support built for ELKS pattern binaries then you can do
> resizing at runtime as they are laid out to allow the bss to extend

This is what I expected - but rebuilding the kernel with and without
the corresponding option did not seem to change the result.

Indicating the desired data area size with -H improved the outcome but still
the available space looks smaller than it should be. Sigh, I did not plan
to do kernel hacking just to make the pres utility work as it used to. :)

/Rl