Huge and far pointer...

An007kit's Avatar, Join Date: Oct 2007
Go4Expert Member
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....
0
DaWei's Avatar, Join Date: Dec 2006
Team Leader
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.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
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.