My C# application has a large working set size compared to the size of private memory. Private bytes are 20 MB and the working set size is 160 MB. Because of this large working set, the commit charge is getting high and when it exceeds a particular percentage, the app crashes.
Is it advisable to use SetProcessWorkingSetSize
to limit the working set size of the app? Will this reduce the working set size? What would happen when the working set exceeds the amount specified in SetProcessWorkingSetSize
?