delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/09/02:11:35

Date: Tue, 9 Jul 1996 09:06:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Leath Muller <leathm AT gbrmpa DOT gov DOT au>
Cc: djgpp AT delorie DOT com
Subject: Re: Near pointers, are they bad?
In-Reply-To: <199607090524.PAA24424@gbrmpa.gov.au>
Message-Id: <Pine.SUN.3.91.960709090217.1036G-100000@is>
Mime-Version: 1.0

On Tue, 9 Jul 1996, Leath Muller wrote:

> What I want to know is: Is this programming practice bad? I assumed that
> a near pointer in protected mode was the same as a far, ie: could access the
> full 4GB segment. It also seems to allow fast memory access...

It effectively disables memory protection, so a program with a wild 
pointer can make all kinds of trouble, like wipe out your disk.  I 
suggest using this technique only if other methods are unacceptably slow 
for your application.  The DJGPP FAQ list (available as v2/faqNNNb.zip 
from the same place you get DJGPP, where NNN is the version number) 
describes the available methods of moving data to memory-mapped 
peripherals in section 18.4 (section 18.6 describes the nearptr method in 
more detail).

- Raw text -


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