Error C3859: Exceeded the virtual memory range of the PCH; recompile with "-zm33" or larger command-line options

Source: Internet
Author: User

This issue occurs when compiling release versions of Orb_slam:

Error 2 C3859: The virtual memory range of the PCH is exceeded; Please use '-zm465 ' or a larger command line


To modify the method:

1. Find Engineering-> Properties->c/c++-> command line-> other options
2. Input/zm100, which can be larger after the number


Reason:

To expedite boost compilation, use a precompiled header. Plus boost's header file is more, causing the PCH file to exceed the default value.


Defined:


/zm (Specify the memory allocation limit for precompiled headers): Determines the amount of memory that the compiler allocates to construct precompiled headers. Format:/zmfactor.
Factor: A scaling factor that determines the amount of memory that the compiler uses to construct precompiled headers. The
Factor parameter is the percentage of the default size of the work buffer defined by the compiler. The default value for the factor parameter is 100 (%), but you can specify a larger or smaller quantity. In earlier versions of Visual C + +, the compiler used several discrete heaps, each of which had certain limitations. Currently, the compiler can dynamically increase the heap on demand, up to the total heap size limit, and only a fixed-size buffer is required to construct the precompiled header. Therefore, it is rarely necessary to/zm compiler options.
If you use the/ZM compiler option and the compiler uses the heap space to emit a C1060 error message, you may have kept too much memory. You may consider removing the/ZM option. If the compiler emits a C1076 error message, the accompanying C3859 message specifies the factor parameters that you should use when recompiling the program with the/ZM compiler option.

Factor value      memory allocation limit
10                 7.5 MB
100              MB
200               MB
1000            750 MB
2000            1500 MB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.