none
Memory issues while compiling the C++ project on 2019 compiler RRS feed

  • Question

  • Hi,

    We have moved our VC++ projects to VS2019 and when tried to build the project we got the following errors after compiling some files...

    3>c1xx: error C3859: Failed to create virtual memory for PCH
    3>c1xx: note: PCH: Unable to get the requested block of memory

    I have gone through the forums as mentioned  by the ciompiler but still getting the same error

    3>c1xx: note: please visit https://aka.ms/pch-help for more details

    Can you please help in resolving these issues?

    Thanks,

    Mohan



    Monday, June 17, 2019 11:07 AM

All replies

  • Virtual Memory/Page file can be edited by R.click my computer/properties/Advanced/Virtual Memory/Advanced/Change Button.With C: highlited set to Let System Manage,click set 2X,exit restart pc...This works for any storage device USB flash included.The default setting to enable,in cmd or run type: diskmgmt.msc   in msc,L.click on the device,go up to Actions/All/Make Active/exit msc...This being the connection to a device is made,use the OS storage software,Intel uses Intel storage mgr
    Tuesday, June 18, 2019 7:52 AM
  • Hi,

    Thank you for posting here.

    >> C3859: Failed to create virtual memory for PCH

    I suggest you could try to use the /Zm compiler flag to specify a larger value for the precompiled header file. /Zm: Determines the amount of memory that the compiler allocates to construct precompiled headers. 

    /Zmfactor

    factor is a scaling factor that determines the amount of memory that the compiler uses to construct precompiled headers.The factor can be 10, 100, 200, 1000, or 2000 to allocate 7.5MB, 75MB, 150MB, 750MB, or 1500MB, respectively. 

    To set the /Zm compiler option in the Visual Studio development environment:
    1,Open the project's Property Pages dialog box.
    2,In the navigation pane, select Configuration Properties > C/C++ > Command Line.
    3,Enter the /Zm compiler option in the Additional Options box.

    Best Regards,

    Jeanine Zhang


    Tuesday, June 18, 2019 8:03 AM
    Moderator