Tag: 工作集

如何在64位.NET进程中设置MinWorkingSet和MaxWorkingSet?

如何为64位.NET进程设置MinWorkingSet和MaxWorking? ps我可以为32位进程设置MinWorkingSet和MaxWorking集,如下所示: [DllImport(“KERNEL32.DLL”, EntryPoint = “SetProcessWorkingSetSize”, SetLastError = true, CallingConvention = CallingConvention.StdCall)] internal static extern bool SetProcessWorkingSetSize(IntPtr pProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize); [DllImport(“KERNEL32.DLL”, EntryPoint = “GetCurrentProcess”, SetLastError = true, CallingConvention = CallingConvention.StdCall)] internal static extern IntPtr MyGetCurrentProcess(); // In main(): SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, int.MaxValue, int.MaxValue);