All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Given <dg@cowlark.com>
To: linux-8086@vger.kernel.org
Subject: Re: Bugs (and some fixes)
Date: Tue, 13 Apr 2004 10:28:56 +0100	[thread overview]
Message-ID: <200404131028.56757.dg@cowlark.com> (raw)
In-Reply-To: <20040412213125.21798.qmail@web11704.mail.yahoo.com>

On Monday 12 April 2004 22:31, Tommy McCabe wrote:
> --- Tommy McCabe <rocketjet314@yahoo.com> wrote:
[...]
> > Compiler/memory model limit.
> > If code is...   and data is...  Use this model...
> > under 64KB      under 64KB      Small (-ms) or Tiny
> > (-mt)
> > over 64KB       under 64KB      Medium (-mm)
> > under 64KB      over 64KB       Compact (-mc)
> > over 64KB       over 64KB       Large (-ml)

The way medium and large models manage to get more than 64kB of code is by 
using multiple code segments. Unfortunately, since you can only address 64kB 
with a 16-bit pointer, this means that you have to use wider pointers if you 
want more than 64kB of code. Most compilers use a 32 bit pointer for this; 16 
bits for the segment, 16 bits for the offset. And just to make matters worse, 
medium mode uses *different* sized pointers for code and data!

Probably an easier solution would be to move some kernel subsystems into user 
space. Sockets would be a classic example, since the code's pretty large. 
You'd have to implement a user-mode interface of some description but I doubt 
that would be particularly hard. We'd lose some performance, but seeing as 
we're planning on running this on an 8088, I don't think performance is a 
major design requirement...

-- 
+- David Given --McQ-+ "I smell a rat; I see him forming in the air &
|  dg@cowlark.com    | darkening the sky; but I'll nip him in the bud."
| (dg@tao-group.com) | --- Sir Boyle Roche
+- www.cowlark.com --+ 

  reply	other threads:[~2004-04-13  9:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-12 21:31 Bugs (and some fixes) Tommy McCabe
2004-04-13  9:28 ` David Given [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-12 14:19 Tommy McCabe
2004-04-12 17:20 ` Alan Cox
2004-04-12 21:34   ` Miguel Bolanos

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=200404131028.56757.dg@cowlark.com \
    --to=dg@cowlark.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.