answersLogoWhite

0

What is near pointer?

Updated: 8/16/2019
User Avatar

Wiki User

11y ago

Best Answer

In the segmented memory model, a near pointer is a memory address that resides in the same segment as the current segment pointer. It had half the memory requirements of a far pointer (which stored the segment and offset, instead of just the offset), but was limited to 1/65536th the maximum distance of the memory that could be referenced. Since the introduction of the flat memory model, all pointers are near pointers, because segments are no longer used in the segmented model addressing. Instead, segments are used for task gates (protected memory), so no normal program would ever access a segment directly. A developer would only need to worry about "near" and "far" pointers on 386s and older processors. It should be noted that other system architectures, such as PowerPC, RISC, and so on, all do not have the concept of segmented memory, and so do not have near or far pointers at all. Instead, all pointers are of the same size and can address any memory location.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is near pointer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the use of near pointer?

*


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.


What are near pointers in C language?

A near pointer is a 16 bit pointer in a 16 bit segmented memory architecture (now obsolete and archaic) that contains only the offset portion of the address of the object.


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 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.


When should a far pointer be used?

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


Where is the crankshaft position sensor on a 96 Ford Bronco 5.8L?

near the harmonic balancer, its under the timing pointer.


Different types of pointers in c language?

... are usable. void pointer (generic pointer) : a special type of pointer which point to some data of no specific types. void *p; null pointer : a special type of pointer which point nowhere. it is usually used to check if a pointer is pointing to a null or free the pointer during deallocation of memory in dynamic memory allocation; it is define by using the predefine constant NULL int *p=NULL; wild pointer : uninitialized pointer. it hold a garbage value. i.e it is not pointing to any memory location yet. dangling pointer: pointer pointing to a destroyed variable. it usually happen during dynamic memory allocation when the object is destroyed but not free and the pointer is still pointing to the destroy object.


Difference between pointer to constant and constant pointer?

1. pointer to a constant means you can not change what the pointer points to 2. constant pointer means you can not change the pointer.


What is triple pointer?

Example: int x; -- integer int *px= &x; -- pointer to integer int **ppx= &px; -- pointer to pointer to integer int ***pppx= &ppx; -- pointer to pointer to pointer to integer


What are pointer to pointer?

A pointer only holds an address information (location) in the memory. if a pointer holds points another pointer then it is a pointer to an other pointer. Pointer holds an address in the memory so in that address there is an other location information that shows another location.


What is pointer of pointer?

pointer is the variable that holds the address of another variable