8.2版本上传

This commit is contained in:
2025-06-12 18:00:06 +08:00
parent a10df85379
commit 6a881f2e8a
263 changed files with 9063 additions and 1338 deletions

View File

@@ -16,7 +16,11 @@ namespace MonoHook
static HookUtils()
{
jit_write_protect_supported = pthread_jit_write_protect_supported_np() != 0;
try
{
jit_write_protect_supported = pthread_jit_write_protect_supported_np() != 0;
}
catch { }
PropertyInfo p_SystemPageSize = typeof(Environment).GetProperty("SystemPageSize");
if (p_SystemPageSize == null)
@@ -35,6 +39,16 @@ namespace MonoHook
public static void MemCpy_Jit(void* pDst, byte[] src)
{
if (!jit_write_protect_supported)
{
fixed(void * pSrc = &src[0])
{
MemCpy(pDst, pSrc, src.Length);
}
return;
}
fixed(void * p = &src[0])
{
memcpy_jit(new IntPtr(pDst), new IntPtr(p), src.Length);