Skip to content

Commit ef2193d

Browse files
authored
Update compiler-error-c3859.md
1 parent 2b8e24e commit ef2193d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c3859.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ helpviewer_keywords: ["C3859"]
99

1010
> Failed to create virtual memory for PCH
1111
12-
The message will have one of the following notes:
12+
The message has one of the following notes:
1313
>the system returned code *error code*: *OS error message*\
1414
>PCH: Address is not a multiple of the system's allocation granularity\
1515
>PCH: The chunk has not been previously reserved\
@@ -29,6 +29,6 @@ There isn't enough virtual memory allocated for your precompiled header. If your
2929

3030
This disganotic primarily in two scenarios.
3131

32-
The first scenario is that the system is overloaded with multiple `/Yu` compile requests at the same time. In this scenario setting the maximum starting virtual memory size typically resolves the issue.
32+
The first scenario is that the system is overloaded with multiple `/Yu` compile requests at the same time. Setting the maximum starting virtual memory size typically resolves this issue.
3333

34-
The second scenario is when the the Windows loader injects a DLL into the process at startup. That injected DLL can allocate memory which conflicts with where the PCH must reside. For example, `msbuild.exe` will inject `FileTracker.dll` into every `CL.exe` process at startup. In this scenario, using the [`/Fp` (Name .pch file)](../../build/reference/fp-name-dot-pch-file.md) flag will ensure that the memory for the PCH is allocated as early as possible in the `CL.exe` process, before any injected DLL. These failures can be intermittent because Windows ASLR will allocate memory at different address across different process invocations. Without `/Fp`, memory for the PCH cannot be allocated until the compiler has compiled enough of the program to see the header file specified in the `/Yu` command line option or the `#pragma hdrstop`. By this time, it is much more likely that the memory required by the PCH will already be reserved.
34+
The second scenario is when the the Windows loader injects a DLL into the process at startup. That injected DLL can allocate memory that conflicts with where the PCH must reside. For example, `msbuild.exe` injects `FileTracker.dll` into every `CL.exe` process at startup. In this scenario, using the [`/Fp` (Name .pch file)](../../build/reference/fp-name-dot-pch-file.md) flag ensures that the memory for the PCH is allocated as early as possible in the `CL.exe` process, before any injected DLL. These failures can be intermittent because Windows ASLR allocates memory at different address across different process invocations. Without `/Fp`, memory for the PCH can't be allocated until the compiler finds the header file `#include` specified in the `/Yu` command line option or the `#pragma hdrstop`. By this time, it's much more likely that the memory required by the PCH is reserved by somthing else.

0 commit comments

Comments
 (0)