public static void Initialize(IJitMemoryAllocator allocator) { if (_initialized) { return; } lock (_lock) { if (_initialized) { return; } _jitRegion = new ReservedRegion(allocator, CacheSize); _cacheAllocator = new CacheMemoryAllocator(CacheSize); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { JitUnwindWindows.InstallFunctionTableHandler(_jitRegion.Pointer, CacheSize, _jitRegion.Pointer + Allocate(PageSize)); } _initialized = true; } }
public static void Initialize(IJitMemoryAllocator allocator) { if (_initialized) { return; } lock (_lock) { if (_initialized) { return; } _jitRegion = new ReservedRegion(allocator, CacheSize); _cacheAllocator = new CacheMemoryAllocator(CacheSize); if (OperatingSystem.IsWindows()) { JitUnwindWindows.InstallFunctionTableHandler(_jitRegion.Pointer, CacheSize, _jitRegion.Pointer + Allocate(PageSize)); } _initialized = true; } }
public JumpTable() { _jumpRegion = new ReservedRegion(JumpTableByteSize); _dynamicRegion = new ReservedRegion(DynamicTableByteSize); _targets = new ConcurrentDictionary <ulong, TranslatedFunction>(); _dependants = new ConcurrentDictionary <ulong, LinkedList <int> >(); }
public JumpTable(IJitMemoryAllocator allocator) { _jumpRegion = new ReservedRegion(allocator, JumpTableByteSize); _dynamicRegion = new ReservedRegion(allocator, DynamicTableByteSize); _targets = new ConcurrentDictionary <ulong, TranslatedFunction>(); _dependants = new ConcurrentDictionary <ulong, LinkedList <int> >(); Symbols.Add((ulong)_jumpRegion.Pointer.ToInt64(), JumpTableByteSize, JumpTableStride, "JMP_TABLE"); Symbols.Add((ulong)_dynamicRegion.Pointer.ToInt64(), DynamicTableByteSize, DynamicTableStride, "DYN_TABLE"); }
static JitCache() { _jitRegion = new ReservedRegion(CacheSize); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _jitRegion.ExpandIfNeeded(PageSize); JitUnwindWindows.InstallFunctionTableHandler(_basePointer, CacheSize); // The first page is used for the table based SEH structs. _offset = PageSize; } _cacheEntries = new List <JitCacheEntry>(); _lock = new object(); }
public static void Initialize(IJitMemoryAllocator allocator) { if (_initialized) return; lock (_lock) { if (_initialized) return; _jitRegion = new ReservedRegion(allocator, CacheSize); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _jitRegion.ExpandIfNeeded(PageSize); JitUnwindWindows.InstallFunctionTableHandler(_jitRegion.Pointer, CacheSize); // The first page is used for the table based SEH structs. _offset = PageSize; } _initialized = true; } }