C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

When should a far pointer be used?

0 votes
16 views
asked by smith Geek (15,340 points)

1 Answer

0 votes
Sometimes you can get away with using a small memory model in most of a given program. There might be just a few things that don’t fit in your small data and code segments. When that happens, you can use explicit far pointers and function declarations to get at the rest of memory. A far function can be outside the 64KB segment most functions are shoehorned into for a small-code model. (Often, libraries are declared explicitly far, so they’ll work no matter what code model the program uses.) A far pointer can refer to information outside the 64KB data segment. Typically, such pointers are used with farmalloc() and such, to manage a heap separate from where all the rest of the data lives. If you use a small-data, large-code model, you should explicitly make your function pointers far.
answered by rock Expert (14,990 points)

Related questions

0 votes
1 answer 18 views
18 views asked by sunny Expert (11,410 points)
0 votes
1 answer 163 views
0 votes
1 answer 35 views
35 views asked by smith Geek (15,340 points)
+1 vote
2 answers 204 views
+1 vote
3 answers 3,177 views
...