delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/29/13:51:19

Message-ID: <F77915E7F086D31197F4009027CC81C92E42E4@probe-2.as-london.acclaim.com>
From: Shawn Hargreaves <SHargreaves AT acclaimstudios DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Fastest bitblt?
Date: Tue, 29 Feb 2000 15:16:57 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii writes:
>>> Not true.  Memory protection is built into protected mode,
>>> at least to some degree.
>> 
>> But an OS can entirely disable it (e.g. what Watcom DOS4GW or
>> DJGPP nearptr do).
>
> No protected-mode OS can entirely disable protection, because
> protection is an integral part of the CPU's memory addressing and
> mapping unit.

True: every memory access goes through both the selector and page
table protection mechanisms. But both of those mechanisms depend
for their usefulness on the selector settings and page table
contents, so the fact that the processor is making these checks
is useless unless the OS has correctly set things up to prevent
access to any unowned memory. A truly protected environment like
Linux or NT has to make sure that the processor is always set to
prevent any illegal accesses, while something like Win9x is far
less strict about that. So I think it is fair to say that although
some protection is always available, the Watcom setup, or djgpp
with nearptr enabled (which is similar to how Watcom always works)
is only very weakly protected, and a stray pointer reference is
far more likely to corrupt memory rather than being trapped.
When not using nearptr, djgpp is far safer, but still not perfect
compared to a system where the OS itself is enforcing these rules.


	Shawn Hargreaves.

- Raw text -


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