Friday, April 13, 2012

Various memory models

Memory model
Description
TINY
Has only one segment. Therefore both data and code combined cannot be greater than 64k.
SMALL
Has one code segment and one data segment. Therefore each code and data cannot be greater than 64k.
MEDIUM
Has more than one code segment and has only one data segment. So code can be greater than 64k but data cannot be greater than 64k.
COMPACT
Has one code segment and many data segment. Hence data can be greater than 64k but code cannot be greater than 64k.
LARGE
Has more than one code segment and more than one data segment. No array is larger than 64k. thus both data and code can be greater than 64k.
HUGE
More than one code segment and more than one data segment. Arrays may be larger than 64k. hence both data and code can be greater than 64k.
FLAT
Has only one segment upto 4GB. All data and code including system resources are in a single 32 bit segment.

No comments:

Post a Comment