The six Microsoft C/C++ memory models are shown in Table 4.1.
Table 4.1 Memory Models
Maximum Total Memory |
Model | Code | Data | Data Arrays |
Tiny | <64K | <64K | <64K |
Small | 64K | 64K | 64K |
Medium | No limit | 64K | 64K |
Compact | 64K | No limit | 64K |
Large | No limit | No limit | 64K |
Huge | No limit | No limit | No limit |
The SETUP program creates the libraries that support the six standard memory models.
When you choose one of the standard memory models, the compiler inserts the name of the corresponding C run-time library in the object file so the linker chooses it automatically. Each memory model has its own library, except for the huge memory model (which uses the large-model library) and the tiny model (which uses the small-model library).