answersLogoWhite

0


Best Answer

Near, far, and huge pointers are different types of pointers used to reconcile the different addressing models of the Intel 8086/8088 class processors, running in a 16-bit operating system such as Windows 3.x, as well as any of the newer incarnations running in real mode or virtual 8086 mode.

A near pointer can address something within one 64Kb memory segment, containing only an offset, and it takes two bytes. The segment is implied by context, and is usually the data segment, selected for the addressing model.

A far pointer can address anything in the 1Mb memory1, containing both a segment and an offset, and it takes four bytes.

A huge pointer is a normalised far pointer, which means its offset part is always between 00H and 0FH.

In 32-bit mode a pointer can address anything in 4Gb memory, containing a flat 32-bit offset, and it takes four bytes. (In this mode segments have no significance.) It only works, however, when there is support for it, such as the WIN32 extension of Windows 3.x.

---------------------------------------------------------------------------------------

1In the 80286 or higher, running in protected mode, in OS/2, the segment portion of the pointer is actually a descriptor selector, so 1Mb addressibility depends on the operating system environment.
far huge near pointer is an oxymoron. far points to memory outside of the normal address space. near points to memory within the normal address space, is the default, and usually is not needed. I've never seen huge before. What is the target architecture?
Near, far, and huge pointers are a construct (usually) in the Win16 environment running on an 8086/8088 or later in real mode, such as Visual C/C++ 1.52. In this environment, near pointers are 16 bits, and far and huge pointers are 32 bits.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is near far and huge pointers How many bytes are occupied by them?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How many bytes are read in pointers by pointers dereferencing?

When you dereference a pointer you "read" the number of bytes determined by the pointer's type. That is, a char pointer dereferences a single byte while an int pointer dereferences 4 bytes (assuming a 32-bit int) -- regardless of the type actually stored at that address. However, note that a pointer can only actually point at a single byte since it only has storage for a single memory address. How many additional bytes are dereferenced is entirely dependant on the type of the pointer. To determine how many bytes are actually allocated to an address, use the sizeof operator, passing a dereferenced pointer (the pointer must point at the start of the allocation). If the pointer points at several elements of the same type (an array), then divide the total bytes by the size of the pointer's type to determine the number of elements in the array.


How many bytes is a double variable?

There are 8 bytes in a double


How many bytes are occupied by declaring following array of characters?

A single-byte type of array has 1 byte per character; a wide-character array has 2 bytes per character of storage. Without seeing the exact definition it cannot be determined what the actual size of the array would be.


How many bytes are used to store a 64-bit number?

how many bytes are there in a 64-bit machine? Another Answer: It takes 8 bytes to store a 64 bit number.


How many bytes in 640 MB?

640 x 1024 x 1024 bytes (data transfer) 640 x 1000 x 1000 bytes (storage)

Related questions

How many bytes occupied for arrays?

It all depends on the length and data type of the array...


How many bytes are read in pointers by pointers dereferencing?

When you dereference a pointer you "read" the number of bytes determined by the pointer's type. That is, a char pointer dereferences a single byte while an int pointer dereferences 4 bytes (assuming a 32-bit int) -- regardless of the type actually stored at that address. However, note that a pointer can only actually point at a single byte since it only has storage for a single memory address. How many additional bytes are dereferenced is entirely dependant on the type of the pointer. To determine how many bytes are actually allocated to an address, use the sizeof operator, passing a dereferenced pointer (the pointer must point at the start of the allocation). If the pointer points at several elements of the same type (an array), then divide the total bytes by the size of the pointer's type to determine the number of elements in the array.


How many is 1gb?

1073741824 bytes or 10243 bytes or 230 bytes


How many bytes are thre in one kilo- Bytes?

1024 bytes


How many bytes in 512mb?

536870912 Bytes


How many bytes are in a KGB?

1024 bytes


How many bytes are needed to structure PCB and and different purposes of these bytes?

how many bytes are needed to structure PCB Also explain different purposes of these bytes


How many bytes are in 128 mega bytes?

128 megabytes equals 134,217,728 bytes.


1 megabit have how many bytes?

125000 bytes Wrong. 1MB has 1048576 bytes.


How many bytes is 847263 bytes KB?

847,263 bytes is 827.405273KB 1 kilobyte is equal to 1024 bytes. Bytes / 1024 (bytes in a kilobyte) = kilobytes 847,263 bytes / 1024 (bytes in a kilobyte) = 827.405273 kilobytes


1027254 bytes equalto how many 1 gb equals to how many bytes?

1027254 bytes equals .97 megabytes


How many mega bytes is 75000 bytes?

0.075