Пример #1
0
        internal override void UnprotectPageRange(byte *start, ulong size, bool force = false)
        {
            if (size == 0)
            {
                return;
            }

            if (UsePageProtection || force)
            {
                if (Syscall.mprotect(new IntPtr(start), new IntPtr((int)size), ProtFlag.PROT_READ | ProtFlag.PROT_WRITE) == 0)
                {
                    return;
                }
                var err = Marshal.GetLastWin32Error();
                Debugger.Break();
            }
        }