www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/19/04:56:32

Date: Wed, 19 Nov 1997 11:55:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: wolfman AT cedar DOT alberni DOT net
cc: djgpp AT delorie DOT com
Subject: Re: Urgent: memory protection and graphics
In-Reply-To: <b127cd$17135.33c@news.alberni.net>
Message-ID: <Pine.SUN.3.91.971119114831.8465B-100000@is>
MIME-Version: 1.0

On Wed, 19 Nov 1997 wolfman AT cedar DOT alberni DOT net wrote:

> I am very tempted to shut off memory protection when the graphics mode is 
> set and to turn it back on when the program exits.  Is there any 
> proplem with this?

Yes, you lose the memory protection ;-).

But if you did that with Watcom (which defeats memory protection by 
default), then why do you hesitate now?

> The faq and documentation is very vague about the subject.

What's vague in the FAQ about this?  It clearly tells you what the 
dangers are.  Either risk that or find a safer way.  For example, using 
the farptr functions is safer, but usually the same speed.  You just need 
to toss that array-like approach you use and call farptr functions 
instead (they are inlined).  Or, you could create the buffer in memory 
and then blit it to the screen with dosmemput, which is also 
lightning-fast.

>  I desperately need the speed increase.  What should I do?

You need to decide whether the memory protection is important enough to 
do some changes in your code.  If not, go ahead and live dangerously.

- Raw text -


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