Far pointers in unix

This is a discussion on Far pointers in unix within the C Programming forums, part of the General Programming Boards category; Hi, Can anyone tell how should i use far pointers in unix. If far pointer is not available, Is there ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    22

    Far pointers in unix

    Hi,
    Can anyone tell how should i use far pointers in unix.
    If far pointer is not available,
    Is there any other mechanism to acheive that.

    Thanks
    by
    A.Sebasti

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    The keyword 'far' is obsoleted by 32bit integers (and thus, pointers). The word 'far' is only ever used on 16bit-integer compilers. Just use pointers as normal, and omit 'far'.

    Quzah.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    22

    Reply

    Hi,
    Thanks for your solution.
    I have tried that one also but i am not able to achive the task.

    The situation is like this.
    I am forking many processes.
    The variable(actually the address of it) that i have created by parent process should be available to the children also.
    Any approach is welcomed.

    Thanks
    By
    A.Sebasti...

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    > The variable(actually the address of it) that i have created by parent process should be available to the children also.
    Then you haven't understood how fork works - each process has its own address space which only "looks" identical at the moment of fork.

    As soon as either process writes to their respective data spaces, they diverge, and the change is not reflected in the data space of the other process.

    You need to look up shared memory if you want to do this.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  2. moving pointers to pointers
    By Benzakhar in forum C++ Programming
    Replies: 9
    Last Post: 12-27-2003, 07:30 AM
  3. pointers to pointers within structs
    By Lord_azrael99 in forum C Programming
    Replies: 2
    Last Post: 08-28-2003, 04:29 AM
  4. Pointers program
    By Jamina in forum C++ Programming
    Replies: 3
    Last Post: 08-06-2003, 02:31 PM
  5. delete and delete[]
    By Hunter2 in forum C++ Programming
    Replies: 13
    Last Post: 06-26-2003, 04:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21