Re: use of FAR pointers with gcc

From: Richard Tobin (richard_at_cogsci.ed.ac.uk)
Date: 05/31/04


Date: 31 May 2004 16:50:36 GMT

In article <c9floa$e60$1@ctb-nnrp2.saix.net>,
tanuki <phake@sadomain.co.za> wrote:

>if i just try something like long *ptr 0xb8000000
>and write to it linux gives me a segfault and windows gives me a
>"read/write" error

You seem to be expecting the video memory to exist at a specific place
in your program's memory. I don't know about Windows, but normal
operating systems like Linux provide virtual memory, and will not map
memory corresponding to devices into your address space unless you
specifically request it.

So your problem is how to map the video memory into your process, and
that will be done by some library function, most likely in conjunction
with opening some device. It's not a problem with your C pointers as
such.

-- Richard



Relevant Pages

  • Re: RH9 Poor performance, stability
    ... how much memory do most people recommend for XP? ... Minimum ram and "completely unacceptable performance" are just as nebulous ... Linux users who've experienced the same performance problems as I have ... >>or even Windows, rather than extremely bloated down like Linux. ...
    (comp.os.linux.setup)
  • Re: RH9 Poor performance, stability
    ... how much memory do most people recommend for XP? ... Minimum ram and "completely unacceptable performance" are just as nebulous ... Linux users who've experienced the same performance problems as I have ... >>or even Windows, rather than extremely bloated down like Linux. ...
    (comp.os.linux.misc)
  • Re: RH9 Poor performance, stability
    ... how much memory do most people recommend for XP? ... they are exactly the same "less round". ... >some other Linux users in this thread. ... >or even Windows, rather than extremely bloated down like Linux. ...
    (comp.os.linux.setup)
  • Re: RH9 Poor performance, stability
    ... how much memory do most people recommend for XP? ... they are exactly the same "less round". ... >some other Linux users in this thread. ... >or even Windows, rather than extremely bloated down like Linux. ...
    (comp.os.linux.misc)
  • Naive Windows VM paging algorithm - is Linux better?
    ... I am becoming increasingly frustrated with the somewhat naive paging ... dedicated application whose memory footprint is quite large - around ... of physical memory - say 512M, Windows has no mechanism for allowing ... can I be smarter in Linux?. ...
    (comp.os.linux.misc)