Mail Archives: djgpp/1996/11/15/12:31:29
> > > 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 -