diff options
Diffstat (limited to 'ARMeilleure/Memory/MemoryManagementWindows.cs')
| -rw-r--r-- | ARMeilleure/Memory/MemoryManagementWindows.cs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/ARMeilleure/Memory/MemoryManagementWindows.cs b/ARMeilleure/Memory/MemoryManagementWindows.cs index c1a84c95..ae64b5c6 100644 --- a/ARMeilleure/Memory/MemoryManagementWindows.cs +++ b/ARMeilleure/Memory/MemoryManagementWindows.cs @@ -36,12 +36,6 @@ namespace ARMeilleure.Memory WriteCombineModifierflag = 0x400 } - private enum WriteWatchFlags : uint - { - None = 0, - Reset = 1 - } - [DllImport("kernel32.dll")] private static extern IntPtr VirtualAlloc( IntPtr lpAddress, @@ -62,15 +56,6 @@ namespace ARMeilleure.Memory IntPtr dwSize, AllocationType dwFreeType); - [DllImport("kernel32.dll")] - private static extern int GetWriteWatch( - WriteWatchFlags dwFlags, - IntPtr lpBaseAddress, - IntPtr dwRegionSize, - IntPtr[] lpAddresses, - ref ulong lpdwCount, - out uint lpdwGranularity); - public static IntPtr Allocate(IntPtr size) { const AllocationType flags = @@ -130,27 +115,5 @@ namespace ARMeilleure.Memory { return VirtualFree(address, IntPtr.Zero, AllocationType.Release); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool GetModifiedPages( - IntPtr address, - IntPtr size, - IntPtr[] addresses, - out ulong count) - { - ulong pagesCount = (ulong)addresses.Length; - - int result = GetWriteWatch( - WriteWatchFlags.Reset, - address, - size, - addresses, - ref pagesCount, - out uint granularity); - - count = pagesCount; - - return result == 0; - } } }
\ No newline at end of file |
