/// <summary> /// Initializes a new instance of the <see cref="TestRuntime"/>. /// </summary> public TestRuntime() { _memoryPageManager = new Win32MemoryPageManager(); _typeLoader = new DefaultTypeSystem(); _assemblyLoader = new AssemblyLoader(_typeLoader); _jitService = new SimpleJitService(); }
/// <summary> /// Initializes a new instance of <see cref="CompilationRuntime"/>. /// </summary> public CompilationRuntime() { _typeLoader = new DefaultTypeSystem(); _assemblyLoader = new AssemblyLoader(_typeLoader); _memoryManager = new MockMemoryPageManager(); _jitService = new MockJitService(); }
/// <summary> /// Initializes a new instance of the <see cref="TestRuntime"/>. /// </summary> public TestRuntime() { _memoryPageManager = new Win32MemoryPageManager(); _typeLoader = new DefaultTypeSystem(); _assemblyLoader = new AssemblyLoader(_typeLoader); _jitService = new SimpleJitService(); }
/// <summary> /// Initializes a new instance of <see cref="CompilationRuntime"/>. /// </summary> public CompilationRuntime() { this.typeLoader = new DefaultTypeSystem(); this.assemblyLoader = new AssemblyLoader(this.typeLoader); this.memoryManager = new MockMemoryPageManager(); this.jitService = new MockJitService(); }
/// <summary> /// Initializes a new instance of <see cref="CompilationRuntime"/>. /// </summary> public CompilationRuntime() { _typeLoader = new DefaultTypeSystem(); _assemblyLoader = new AssemblyLoader(_typeLoader); _memoryManager = new MockMemoryPageManager(); _jitService = new MockJitService(); }
/// <summary> /// Initializes a new <see cref="VirtualMemoryStream"/> and allocates the requested amount of virtual memory to back it. /// </summary> /// <param name="pageManager"></param> /// <param name="allocationSize">The number of bytes to allocate from virtual memory.</param> public unsafe VirtualMemoryStream(IMemoryPageManager pageManager, uint allocationSize) { _memory = pageManager.Allocate(IntPtr.Zero, allocationSize, PageProtectionFlags.Read | PageProtectionFlags.Write | PageProtectionFlags.Execute); if (IntPtr.Zero == _memory) throw new OutOfMemoryException(); base.Initialize((byte*)_memory.ToPointer(), allocationSize, allocationSize, FileAccess.Write); _allocationSize = allocationSize; _pageManager = pageManager; }
/// <summary> /// Initializes a new <see cref="VirtualMemoryStream"/> and allocates the requested amount of virtual memory to back it. /// </summary> /// <param name="pageManager"></param> /// <param name="allocationSize">The number of bytes to allocate from virtual memory.</param> public unsafe VirtualMemoryStream(IMemoryPageManager pageManager, uint allocationSize) { _memory = pageManager.Allocate(IntPtr.Zero, allocationSize, PageProtectionFlags.Read | PageProtectionFlags.Write | PageProtectionFlags.Execute); if (IntPtr.Zero == _memory) { throw new OutOfMemoryException(); } base.Initialize((byte *)_memory.ToPointer(), allocationSize, allocationSize, FileAccess.Write); _allocationSize = allocationSize; _pageManager = pageManager; }