28 references to Constants
System.Private.CoreLib (28)
System\Runtime\ThunkPool.cs (28)
95
Debug.Assert(((nuint)(nint)thunkDataBlock %
Constants
.PageSize) == 0);
98
*(IntPtr*)(thunkDataBlock + (int)(
Constants
.PageSize - IntPtr.Size)) = commonStubAddress;
99
Debug.Assert(*(IntPtr*)(thunkDataBlock + (int)(
Constants
.PageSize - IntPtr.Size)) == commonStubAddress);
103
_lastThunkPtr = _nextAvailableThunkPtr +
Constants
.ThunkDataSize * (
Constants
.NumThunksPerBlock - 1);
129
Debug.Assert(((nuint)(nint)thunkDataBlock %
Constants
.PageSize) == 0);
132
*(IntPtr*)(thunkDataBlock + (int)(
Constants
.PageSize - IntPtr.Size)) = _commonStubAddress;
133
Debug.Assert(*(IntPtr*)(thunkDataBlock + (int)(
Constants
.PageSize - IntPtr.Size)) == _commonStubAddress);
139
_lastThunkPtr = *((IntPtr*)_lastThunkPtr) +
Constants
.ThunkDataSize * (
Constants
.NumThunksPerBlock - 1);
178
int thunkIndex = (int)(((nuint)(nint)nextAvailableThunkPtr) - ((nuint)(nint)nextAvailableThunkPtr & ~
Constants
.PageSizeMask));
179
Debug.Assert((thunkIndex %
Constants
.ThunkDataSize) == 0);
180
thunkIndex /=
Constants
.ThunkDataSize;
182
IntPtr thunkAddress = RuntimeImports.RhpGetThunkStubsBlockAddress(nextAvailableThunkPtr) + thunkIndex *
Constants
.ThunkCodeSize;
218
thunkAddressValue < (nuint)(nint)currentBlock._blockBaseAddress + (nuint)(
Constants
.NumThunksPerBlock *
Constants
.ThunkCodeSize))
234
nuint currentThunksBlockAddress = thunkAddressValue & ~
Constants
.PageSizeMask;
237
if ((thunkAddressValue - currentThunksBlockAddress) % (nuint)
Constants
.ThunkCodeSize != 0)
241
int thunkIndex = (int)((thunkAddressValue - currentThunksBlockAddress) / (nuint)
Constants
.ThunkCodeSize);
246
return thunkDataBlockAddress + thunkIndex *
Constants
.ThunkDataSize;
295
private static IntPtr[] s_currentlyMappedThunkBlocks = new IntPtr[
Constants
.NumThunkBlocksPerMapping];
296
private static int s_currentlyMappedThunkBlocksIndex =
Constants
.NumThunkBlocksPerMapping;
307
if (s_currentlyMappedThunkBlocksIndex <
Constants
.NumThunkBlocksPerMapping)
328
for (int i = 0; i <
Constants
.NumThunkBlocksPerMapping; i++)
342
for (int i = 0; i <
Constants
.NumThunksPerBlock; i++)
344
if (i == (
Constants
.NumThunksPerBlock - 1))
347
*((IntPtr*)(dataAddress)) = dataAddress +
Constants
.ThunkDataSize;
354
dataAddress +=
Constants
.ThunkDataSize;