Re: segmentation fault when porting to linux
- From: Joe Pfeiffer <pfeiffer@xxxxxxxxxxx>
- Date: Tue, 26 Feb 2008 10:25:09 -0700
email7373388@xxxxxxxxxxxxxxx writes:
I want to move to linux from DOS / Win98, and the piece of hardware
communicates this way (see snippet below).
This snippet works just fine in DOS / Win98, but in linux it fails
with a segmentation fault. Any idea how to make it work?
You can't.
Based on the variable names in the code, you seem to be assuming that
you can get direct access to physical memory addresses. A program
under Linux only sees virtual addresses.
I assume there is something interesting at that physical address. If
that's a device of some sort, there is almost certainly a device
driver to control it; learn the driver. Alternatively, man mem.
Note that the fact code like that works under DOS and 16-bit Windows
is the reason a single application with a wild pointer can crash the
system.
.
- References:
- segmentation fault when porting to linux
- From: email7373388
- segmentation fault when porting to linux
- Prev by Date: c++, java, cobol
- Next by Date: Re: segmentation fault when porting to linux
- Previous by thread: Re: segmentation fault when porting to linux
- Next by thread: Re: segmentation fault when porting to linux
- Index(es):
Relevant Pages
|