Beispiel #1
0
 /// <summary>
 /// Free memory trampoline.
 /// </summary>
 /// <param name="address"></param>
 public static void FreeTrampoline(IntPtr address)
 {
     if (OSHelper.IsPosix)
     {
         Mman.munmap(address, TrampolineInstruction.Length);
     }
     else
     {
         Kernel32.VirtualFree(address, TrampolineInstruction.Length);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Free memory trampoline.
 /// </summary>
 /// <param name="address"></param>
 public static void FreeTrampoline(IntPtr address)
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         Kernel32.VirtualFree(address, TrampolineInstruction.Length);
     }
     else
     {
         Mman.munmap(address, TrampolineInstruction.Length);
     }
 }