Mail Archives: djgpp/1997/05/20/14:26:11
On Mon, 19 May 1997, Bowers wrote:
> Hello,
>
> whenever I program anything using DJGPP, I always get some sort of
> segmentation error. How do I aviod this, and what exactly is a
> segmentation error?
>
A segmentation error indicates that you have attempted to write to memory
which your process does not own. Usually it is a write to an address
outside of your current address space due to a runaway pointer or array
index. It may also be due to your code trying to write to a hardware
address which has not been mapped from its real-mode address into your
vitual memory space. Remember that DJGPP is a protected mode/virtual
memory compiler and that DOS and hardware addresses (such as video memory
and interrupt controller addresses and DOS tables) are not available as
direct addresses. You either have to address these using 'near
pointers', use the access routines supplied in DJGPP, or cause these
addresses to be mapped into your address space. Please read the FAQ for
further details this is a subject which is covered in detail there and in
various places in the info files.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -