www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/07/10:12:18

Date: Mon, 7 Jun 93 09:48:25 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: engdahl AT brutus DOT aa DOT ab DOT com
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: DPMI support

> This sounds dangerous (thinking of wild programs stabbing low mem).

Welcome to MS-DOS.

> Wouldn't it be better to unmap this region, and provide functions to
> map it only if the program asked for it via an system call?  Maybe the
> safety intrinisic in hiding a 1 meg space in 4 gig is adequate. An
> incrementing pointer won't run into e0000000, because it will fault
> first. Let's see, a randomly generated pointer has a 1 in 4096 chance
> of hitting the mapped low memory.

Unfortunately, the stuff that's dangerous to hit is also the stuff
most commonly needed, and a lot of code already expects it.  With the
DPMI-needed calls, the mapping is actually in a different segment, so
a runaway pointer cannot possibly hit it.  Eventually, the mapping
will have to go away completely if DPMI 1.0 doesn't become common.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019