Export (0) Print
Expand All
Expand Minimize
7 out of 10 rated this helpful - Rate this topic

/Zm (Specify Precompiled Header Memory Allocation Limit)

/Zmnumber

where:

number
A scaling factor that determines the compiler's memory allocation limit for the precompiled header.

Remarks

/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:

number Memory allocation
10 5.0 MB
100 50 MB
200 100 MB
1000 500 MB
2000 1000 MB

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

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Command Line property page.
  4. Type the compiler option in the Additional Options box.

To set this compiler option programmatically

See AdditionalOptions.

See Also

Compiler Options | Setting Compiler Options

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.