diff options
Diffstat (limited to 'src/System.Data.SqlClient/tests/StressTests/System.Data.StressRunner/MemApi.Windows.cs')
-rw-r--r-- | src/System.Data.SqlClient/tests/StressTests/System.Data.StressRunner/MemApi.Windows.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/System.Data.SqlClient/tests/StressTests/System.Data.StressRunner/MemApi.Windows.cs b/src/System.Data.SqlClient/tests/StressTests/System.Data.StressRunner/MemApi.Windows.cs new file mode 100644 index 0000000000..8f8953a47c --- /dev/null +++ b/src/System.Data.SqlClient/tests/StressTests/System.Data.StressRunner/MemApi.Windows.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Runtime.InteropServices; + +namespace DPStressHarness +{ + static class MemApi + { +#pragma warning disable BCL0015 // Invalid Pinvoke call + [DllImport("KERNEL32")] + public static extern IntPtr GetCurrentProcess(); +#pragma warning restore BCL0015 // Invalid Pinvoke call + +#pragma warning disable BCL0015 // Invalid Pinvoke call + [DllImport("KERNEL32")] + public static extern bool SetProcessWorkingSetSize(IntPtr hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize); +#pragma warning restore BCL0015 // Invalid Pinvoke call + } +} |