in Technology by
What is the difference between near, far and huge pointers?

1 Answer

0 votes
by

The differences are only relevant On 16-bit intel architectures. On a 16-bit x86 segmented memory architecture, four registers are used to refer to the respective segments:

DS → data segment
CS → code segment
SS → stack segment
ES → extra segment

A logical address on this architecture is composed of the segment and an offset. Now let see the difference between near far and huge pointers.

  • The near pointers refer (as an offset) to the current segment. They don’t have a selector they have an implied selector. The near pointers can access 64k off the virtual address space.
  • The Far pointers use segment info and an offset to point across segments. They have an explicit selector. However, when you do pointer arithmetic on them the selector isn’t modified.
  • The huge pointers have an explicit selector. When you do pointer arithmetic on them though the selector can change.

Note: On modern platform (32-bit and 64-bit architectures) memory models are using segments differently. And these keyword is not part of C standard.

 

Related questions

0 votes
    What is difference between far and near pointers?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    What is the difference between pointer to an array and array of pointers?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    ____________ measures how far the predictions are from the actual values. (1)Deviation (2)Variance (3)Difference (4)Bias...
asked May 22, 2021 in Technology by JackTerrance
0 votes
    What are the exact tasks for this you have used Subversion so far?...
asked Feb 17, 2021 in Technology by JackTerrance
0 votes
    What is a far pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    Only one Indian has so far been the President of the UN General Assembly. Who is that person? When and at which session? Please answer the above question....
asked Aug 10, 2022 in Education by JackTerrance
0 votes
    State whether the following statements are True or False, with reasons: The Second World War proved to be far more ... than the First World War. Please answer the above question....
asked Aug 20, 2022 in Education by JackTerrance
0 votes
    What measures have been taken so far to save the refugees? Please answer the above question....
asked Aug 4, 2022 in Education by JackTerrance
0 votes
    2. Method that is used to communicate information to far off places instantly is called (a) ... electromagnetic communication Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    Complete the statements using the given options and justify those statements. (Geographic favourability, ... proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    In the circuit given below, the current in the resistance 20 Ω(far end) is _________ (a) 8.43 A (b) 5 ... Questions for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 20, 2021 in Education by JackTerrance
0 votes
    Which of the following function can be used to identify near zero-variance variables? (a) zeroVar (b) nearVar (c) nearZeroVar (d) all of the mentioned...
asked Oct 7, 2021 in Technology by JackTerrance
0 votes
    What is a near pointer in C?...
asked Jan 21, 2021 in Technology by JackTerrance
0 votes
    8)Which type of cache reference locality aims at designing cache to store the entire block near the Recently Referenced Data? (a) ... I & II (3)None of the options mentioned (4)II...
asked Oct 6, 2020 in Technology by JackTerrance
...