24 references to Constants
System.Private.CoreLib (24)
System\Runtime\ThunkPool.cs (24)
83Debug.Assert(((nuint)(nint)thunkDataBlock % Constants.PageSize) == 0); 87_lastThunkPtr = _nextAvailableThunkPtr + Constants.ThunkDataSize * (Constants.NumThunksPerBlock - 1); 113Debug.Assert(((nuint)(nint)thunkDataBlock % Constants.PageSize) == 0); 119_lastThunkPtr = *((IntPtr*)_lastThunkPtr) + Constants.ThunkDataSize * (Constants.NumThunksPerBlock - 1); 158int thunkIndex = (int)(((nuint)(nint)nextAvailableThunkPtr) - ((nuint)(nint)nextAvailableThunkPtr & ~Constants.PageSizeMask)); 159Debug.Assert((thunkIndex % Constants.ThunkDataSize) == 0); 160thunkIndex /= Constants.ThunkDataSize; 162IntPtr thunkAddress = RuntimeImports.RhpGetThunkStubsBlockAddress(nextAvailableThunkPtr) + thunkIndex * Constants.ThunkCodeSize; 198thunkAddressValue < (nuint)(nint)currentBlock._blockBaseAddress + (nuint)(Constants.NumThunksPerBlock * Constants.ThunkCodeSize)) 214nuint currentThunksBlockAddress = thunkAddressValue & ~Constants.PageSizeMask; 217if ((thunkAddressValue - currentThunksBlockAddress) % (nuint)Constants.ThunkCodeSize != 0) 221int thunkIndex = (int)((thunkAddressValue - currentThunksBlockAddress) / (nuint)Constants.ThunkCodeSize); 226return thunkDataBlockAddress + thunkIndex * Constants.ThunkDataSize; 275private static IntPtr[] s_currentlyMappedThunkBlocks = new IntPtr[Constants.NumThunkBlocksPerMapping]; 276private static int s_currentlyMappedThunkBlocksIndex = Constants.NumThunkBlocksPerMapping; 287if (s_currentlyMappedThunkBlocksIndex < Constants.NumThunkBlocksPerMapping) 308for (int i = 0; i < Constants.NumThunkBlocksPerMapping; i++) 322for (int i = 0; i < Constants.NumThunksPerBlock; i++) 324if (i == (Constants.NumThunksPerBlock - 1)) 327*((IntPtr*)(dataAddress)) = dataAddress + Constants.ThunkDataSize; 334dataAddress += Constants.ThunkDataSize;