private void getEEInfo(IntPtr _this, ref CORINFO_EE_INFO pEEInfoOut) { pEEInfoOut = new CORINFO_EE_INFO(); #if DEBUG // In debug, write some bogus data to the struct to ensure we have filled everything // properly. fixed (CORINFO_EE_INFO* tmp = &pEEInfoOut) MemoryHelper.FillMemory((byte*)tmp, 0xcc, Marshal.SizeOf<CORINFO_EE_INFO>()); #endif int pointerSize = this.PointerSize; pEEInfoOut.offsetOfDelegateInstance = (uint)pointerSize; // Delegate::m_firstParameter pEEInfoOut.offsetOfDelegateFirstTarget = (uint)(4 * pointerSize); // Delegate::m_functionPointer pEEInfoOut.offsetOfObjArrayData = (uint)(2 * pointerSize); }
public virtual void getEEInfo_wrapper(IntPtr _this, out IntPtr exception, ref CORINFO_EE_INFO pEEInfoOut) { exception = IntPtr.Zero; try { getEEInfo(ref pEEInfoOut); return; } catch (Exception ex) { exception = AllocException(ex); } }
private void getEEInfo(ref CORINFO_EE_INFO pEEInfoOut) { pEEInfoOut = new CORINFO_EE_INFO(); #if DEBUG // In debug, write some bogus data to the struct to ensure we have filled everything // properly. fixed (CORINFO_EE_INFO* tmp = &pEEInfoOut) MemoryHelper.FillMemory((byte*)tmp, 0xcc, Marshal.SizeOf<CORINFO_EE_INFO>()); #endif int pointerSize = this.PointerSize; pEEInfoOut.inlinedCallFrameInfo.size = this.SizeOfPInvokeTransitionFrame; pEEInfoOut.offsetOfDelegateInstance = (uint)pointerSize; // Delegate::m_firstParameter pEEInfoOut.offsetOfDelegateFirstTarget = (uint)(4 * pointerSize); // Delegate::m_functionPointer pEEInfoOut.offsetOfObjArrayData = (uint)(2 * pointerSize); pEEInfoOut.sizeOfReversePInvokeFrame = (uint)(2 * pointerSize); pEEInfoOut.osPageSize = new UIntPtr(0x1000); pEEInfoOut.maxUncheckedOffsetForNullObject = (_compilation.NodeFactory.Target.IsWindows) ? new UIntPtr(32 * 1024 - 1) : new UIntPtr((uint)pEEInfoOut.osPageSize / 2 - 1); pEEInfoOut.targetAbi = CORINFO_RUNTIME_ABI.CORINFO_CORERT_ABI; }
static void _getEEInfo(IntPtr thisHandle, IntPtr* ppException, ref CORINFO_EE_INFO pEEInfoOut) { var _this = GetThis(thisHandle); try { _this.getEEInfo(ref pEEInfoOut); } catch (Exception ex) { *ppException = _this.AllocException(ex); } }