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:
    http://www.daweidesigns.com
    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,375
    Likes Received:
    388
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice