Date: Fri, 15 Nov 1996 12:20:38 -0500 Message-Id: <199611151720.MAA20713@delorie.com> From: DJ Delorie To: gminer AT ca DOT newbridge DOT com CC: idr AT cs DOT pdx DOT edu, djgpp AT delorie DOT com In-reply-to: (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.