Tells the compiler to use a specific memory model to generate code and store data.
Intel® 64 architecture
Linux:  | -mcmodel=mem_model  | 
Mac OS X:  | None  | 
Windows:  | None  | 
mem_model  | 
Is the memory model to use. Possible values are: 
  | 
-mcmodel=small  | 
On systems using Intel® 64 architecture, the compiler restricts code and data to the first 2GB of address space. Instruction Pointer (IP)-relative addressing can be used to access code and data.  | 
This option tells the compiler to use a specific memory model to generate code and store data. It can affect code size and performance. If your program has global and static data with a total size smaller than 2GB, -mcmodel=small is sufficient. Global and static data larger than 2GB requires -mcmodel=medium or -mcmodel=large. Allocation of memory larger than 2GB can be done with any setting of -mcmodel.
IP-relative addressing requires only 32 bits, whereas absolute addressing requires 64-bits. IP-relative addressing is somewhat faster. So, the small memory model has the least impact on performance.
NoteWhen you specify -mcmodel=medium or -mcmodel=large, you must also specify compiler option -shared-intel to ensure that the correct dynamic versions of the Intel run-time libraries are used.
None
The following example shows how to compile using -mcmodel:
icl -shared-intel -mcmodel=medium -o prog prog.c
Copyright © 1996-2011, Intel Corporation. All rights reserved.