www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/15/12:31:29

Date: Fri, 15 Nov 1996 12:20:38 -0500
Message-Id: <199611151720.MAA20713@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: gminer AT ca DOT newbridge DOT com
CC: idr AT cs DOT pdx DOT edu, djgpp AT delorie DOT com
In-reply-to: <Pine.SUN.3.90.961115072919.19765A-100000@coop10> (message from
Glen Miner on Fri, 15 Nov 1996 07:47:00 -0500 (EST))
Subject: Re: Memory Protection

> > > If I disable memory protection, will my program run faster?
> > 
> > No.
> 
> Really? I find this hard to believe. How does it detect memory 
> violations? I would tend to think that it doesn't managed to determine 
> this for "free", and would have to waste cycles in order to detect it.

Memory protection is handled by checking to make sure your accesses
are within the segment boundaries.  When you "disable" protection in
djgpp, all you are really doing is resizing the segments to cover all
4Gb of your virtual address space, so it is impossible to be outside
the segment.  The CPU chip still does the computations required, but
these rarely impact execution times - they're done in hardware.

- Raw text -


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