answersLogoWhite

0

In x86 family of CPUs, there are six memory models. Memory is managed in "chunks" (segment or page) of 64K words. To find a specific location, the CPU needs to know the segment it is in and how far down (the offset) it is from the beginning of the segment. In addition, the x86 CPUs support three types of pointers: * near pointers access data in the specified segment * far pointers can access data within a 1MB address space * huge pointers are a type of far pointer, but with specialized behavior So applications written for the x86 world had to specify a type of memory model which detailed how pointers work. Generally speaking, the rules are: If code is under 64KB... and data is under 64KB... use Tiny or Small model

If code is over 64KB... and data is under 64KB... use Medium model

If code is under 64KB... and data is over 64KB... use Compact model

If code is over 64KB... and data is over 64KB... use Large model

User Avatar

Wiki User

17y ago

What else can I help you with?