public static object CreateThunksHeap(IntPtr commonStubAddress) { object newHeap = RuntimeImports.RhCreateThunksHeap(commonStubAddress); if (newHeap == null) { throw new OutOfMemoryException(); } return(newHeap); }