Compartir a través de


/Zm (Specify Precompiled Header Memory Allocation Limit) 

Determines the compiler's memory allocation limit for the precompiled header.

/Zmnumber

Arguments

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

Remarks

The number argument is a scaling factor with a default value of 100, which specifies a memory allocation of 50 MB. The maximum value is 2000. The following table shows how number modifies the memory allocation.

Value 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.

In most cases, use of this compiler option is not necessary. Use it if compiling your program causes an error message, and where the error message reports what the value of /Zm should be.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  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 Also

Reference

Compiler Options
Setting Compiler Options