answersLogoWhite

0

Pointer types are very specific to the compiler used and oftentimes subject to the target architecture. The concept of a near/far differentiation may not have any meaning on the memory model of your target. This has nothing to do with Linux or whatever OS you choose to use. More information should be provided with the documentation of your compiler.

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

What is far and near pointer and how are they used?

It is a matter of the memory model you are using. On old or embedded systems, some memory was outside of the range of a normal pointer. If you have 4 megs of ram you need at least a 22bit pointer to see all of it. But let's say you only have a 16 bit pointer. This means you can only access the first 65K of ram. Odd as it may sound, this was a problem on old computers, and is sometimes an issue on embedded devices with limited processing power. The near and far classifications were a solution. Pointers are near by default. In my example above, the 65K of ram would be accessed with a near pointer. To get past that 16 bit limit, you need a far pointer. Thus: memory within the pointer's range is near. Memory outside of the range is far. Near pointer: char near * ptr; Far pointer: char far * ptr;A far pointer uses both the segment and the offset address to point to a location in memory. A near pointer in contrast uses only the offset address and the default segment. The far pointer can point to any location in memory, whereas the near pointer can only point to a nearby local address.Something that was important 20 years ago. Now you can forget it.


How do you change scrin coulor using far pointer in c ganguage?

brown


What is the contents of the stack pointer after the execution of the call instruction?

On a near call, the stack pointer is 2 less than its original value. On a far call, it is 4 less.


What is falloc?

falloc is a function similar to malloc. Where the function malloc returns a pointer to an area of memory, falloc returns a "far" pointer to a "far" area of memory; i.e., memory that goes beyond the segmented memory limitations inherent to x86 memory architecture.


Far pointer size in C plus plus?

If you are talking "far pointer", then you are probably talking about real mode in a 16 bit environment such as DOS or Windows 3.1, or in Virtual 8086 mode in Windows 95 or higher. In this mode, addressing is segmented into 65536 segments of 65536 bytes each, but each segment overlaps the next by only a 16 byte offset. This gives you addressability to 1048576 bytes. A far pointer is a 32 bit object, containing a 16 bit segment and a 16 bit offset. int __far *p; /* a far pointer called p which points to an int */

Related Questions

What does it mean by huge pointer is normalize give detail about far pointer huge pointer?

On far pointers the comparison operators(== and !=) check the 32 bit value. While >, =,


What is far pointer in c language?

its pointer created for high safety that cant be find by anyone.


What is the Linux equivalent of FAR?

!NEAR


Is Far pointer necessary to create a circular linked list?

It has to be a pointer all right.Regarding 'far' and 'near': forget it, simply use 'Large' data modell (or 'Huge').


What is far and near pointer and how are they used?

It is a matter of the memory model you are using. On old or embedded systems, some memory was outside of the range of a normal pointer. If you have 4 megs of ram you need at least a 22bit pointer to see all of it. But let's say you only have a 16 bit pointer. This means you can only access the first 65K of ram. Odd as it may sound, this was a problem on old computers, and is sometimes an issue on embedded devices with limited processing power. The near and far classifications were a solution. Pointers are near by default. In my example above, the 65K of ram would be accessed with a near pointer. To get past that 16 bit limit, you need a far pointer. Thus: memory within the pointer's range is near. Memory outside of the range is far. Near pointer: char near * ptr; Far pointer: char far * ptr;A far pointer uses both the segment and the offset address to point to a location in memory. A near pointer in contrast uses only the offset address and the default segment. The far pointer can point to any location in memory, whereas the near pointer can only point to a nearby local address.Something that was important 20 years ago. Now you can forget it.


How far does a 1mW laser pointer go?

200 miles


How far can a 5mw laser pointer go?

10 ft


When should a far pointer be used?

Never. 'near' and 'far' pointers are outdated by twenty years!


What software is used by Linux in spread sheet?

There are several, but by far the most prominant for Linux would be LibreOffiice Calc.


Can you get Linux XP for free?

There is no such thing as "Linux XP". If you're referring to Windows XP, then the answer is no. As far as Linux distributions, for the majority of distributions, they are free (as in freedom) and free-of-charge.


What is Linux kernel 2.6 and today's applications on it?

The 2.6 kernel is the latest series of LInux kernels. There are far too many programs that run on Linux to list them all.


How far is a three pointer from the basket?

20 feet from the basketball rim.