Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Huge and far pointer... (http://www.go4expert.com/forums/huge-pointer-t6650/)

An007kit 2Oct2007 23:13

Huge and far pointer...
 
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....

DaWei 3Oct2007 01:25

Re: Huge and far pointer...
 
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.

shabbir 3Oct2007 04:19

Re: Huge and far pointer...
 
Hi all, In a generic OS , memory is organised in a segment:offset 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.


All times are GMT +5.5. The time now is 14:27.