1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Huge and far pointer...

Discussion in 'C' started by An007kit, Oct 2, 2007.

  1. An007kit

    An007kit New Member

    Joined:
    Oct 1, 2007
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Am a student
    Location:
    Live in chandigarh, india
    What are near far and huge pointers and what are their sizes....
    I found some stuff but din find anything which is relevant in the context of c programing....
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    Huge, far, and near pointers are associated with the use of the x86 family of procesors when operating in the segmented memory mode. It is an anachronism that you should not encounter in modern programs. Should you run up against it, Google for segmented memory addressing and, possibly, refer to the documentation for the compiler that was used.
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Hi all, In a generic OS , memory is organised in a segment:eek:ffset fashion. Now say,it is of "X" MB and this "X" MB is made up of say "S" number of segments of each segment having "B" Bytes where S*B Bytes=X MB.

    Near Pointer: A near pointer is that which will only point within the current segment say segment 3 (there are S number of segments numbered 0 to S-1) by containing only offset .

    Far Pointer: A far pointer is that which will point anywhere in the X MB across segments by containing segment+offset .

    Far pointers are not Normalized where as Huge pointers are Normalized.
     

Share This Page