|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
/Zm (Specify Precompiled Header Memory Allocation Limit)
- A scaling factor that determines the compiler's memory allocation limit for the precompiled header.
/Zmnumber determines the compiler's memory allocation limit for the precompiled header. number is a scaling factor with a default value of 100, which specifies a memory allocation of 50MB. The maximum number is 2000. The following table demonstrates how number modifies the memory allocation:
In prior versions of Visual C++, the compiler used a number of discrete heaps, each of which has a finite limit. The compiler now dynamically grows the heaps as necessary, only requiring a fixed size for the memory allocated to the precompiled header. Exceeding precompiled header's heap size limits occurs only in rare circumstances involving very large or very complex programs. Should your program exceed these limits, use /Zm to scale the total size of all of the limits.
Note In most cases, use of this compiler option is not necessary. Use it if compiling your program causes error message C1076.
To set this compiler option in the Visual Studio development environment
- Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
- Click the C/C++ folder.
- Click the Command Line property page.
- Type the compiler option in the Additional Options box.
To set this compiler option programmatically