linux-8086.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: u-vpoa@aetey.se
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-8086 <linux-8086@vger.kernel.org>
Subject: Re: the memory model being used in elks?
Date: Mon, 11 May 2015 13:25:03 +0200	[thread overview]
Message-ID: <20150511112503.GS8197@example.net> (raw)
In-Reply-To: <20150511102708.7f71211a@www.etchedpixels.co.uk>

On Mon, May 11, 2015 at 10:27:08AM +0100, Alan Cox wrote:
> >                |<-------------------- 64K ----------------->|
> >                               |<-------------------- 64K ----------------->|
> > 
> > As many can overlap as it fits, with some extra margins for the stacks.
> > The same works of course for combined code+data+heap too.
> 
> Very clever! You stil then need to know the stack sizes and automatically
> trap and move which means you need to call a helper on function entry
> or alloca, but that's not difficult.

Venix/86 did not use such helpers. I think it was reserving some
reasonable amount for the stack and also was checking the stack
pointer of the running process regularly for entering the "red zone"
or something like that. This worked quite good provided that nobody put
large arrays on the stack - the latter did not work and could kill
the system.

> It doesn't work in protected mode, which ELKS supports but for real mode
> that would work beautifully.

Indeed, why not.

> The ELKS format basically turns the traditional arrangement around with a
> predefined stack size rather than heap size, and stack at bottom, so the
> heap can then expand upwards without mess.

Apparently it preallocates too much for the stack in my case.
Is there any means to tune this per binary?

Rl


      reply	other threads:[~2015-05-11 11:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 20:14 the memory model being used in elks? u-vpoa
2015-05-09 17:03 ` One Thousand Gnomes
2015-05-09 17:47   ` u-vpoa
2015-05-09 17:50     ` Jody Bruchon
2015-05-09 18:38       ` u-vpoa
2015-05-10 15:31         ` Juan Perez-Sanchez
2015-05-10 18:40           ` u-vpoa
2015-05-10 20:27             ` Alan Cox
2015-05-10 21:19               ` u-vpoa
2015-05-10 21:51                 ` Alan Cox
2015-05-11  6:10                   ` u-vpoa
2015-05-11  9:27                     ` Alan Cox
2015-05-11 11:25                       ` u-vpoa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150511112503.GS8197@example.net \
    --to=u-vpoa@aetey.se \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-8086@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).