I am wondering how to set the following value within .NET 4.0 (it has a getter, but not a setter):
Process.GetCurrentProcess().PeakWorkingSet64();
Update:
I would like to set this to a very high value, to reduce soft page faults which are caused by the increase in the programs working set. This may help with latency issues we have identified with a profiler.
Update:
As Yuxiu pointed out, you can't set the peak (its rather an observation). What I really want to do is set the working set for a 64-bit process:
Process.GetCurrentProcess().WorkingSet64() = xxx;
Update:
The correct answer to this question is at How to set MinWorkingSet and MaxWorkingSet in a 64-bit .NET process?