416 references to Size
aspire (1)
Processes\DetachedProcessLauncher.Windows.cs (1)
69(nint)(nint.Size * handles.Length),
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
ILCompiler.ReadyToRun (1)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
4792if (IntPtr.Size == 4)
ILCompiler.RyuJit (1)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
4792if (IntPtr.Size == 4)
ILLink.RoslynAnalyzer (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
Microsoft.AspNetCore.DataProtection (1)
Repositories\RegistryXmlRepository.cs (1)
84var registryView = IntPtr.Size == 4 ? RegistryView.Registry32 : RegistryView.Registry64;
Microsoft.AspNetCore.Routing (2)
Matching\ILEmitTrieFactory.cs (1)
55return (IntPtr.Size == 8) &&
Matching\JumpTableBuilder.cs (1)
68var threshold = IntPtr.Size == 8 ? 100 : 50;
Microsoft.Build (1)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.Build.Framework (1)
XMakeAttributes.cs (1)
437currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
Microsoft.CodeAnalysis (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.Scripting (1)
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs (1)
37public static readonly ImmutableArray<ProcessorArchitecture> CurrentArchitectures = (IntPtr.Size == 4)
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.Diagnostics.DataContractReader.Legacy (2)
NativeStringHolder.cs (2)
39_vtablePtr = Marshal.AllocHGlobal(IntPtr.Size); 43_objectPtr = Marshal.AllocHGlobal(IntPtr.Size);
Microsoft.Extensions.Caching.Hybrid.Tests (1)
HybridCacheEventSourceTests.cs (1)
226log.WriteLine($".NET {Environment.Version} on {Environment.OSVersion}, {IntPtr.Size * 8}-bit");
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
318if (IntPtr.Size == 4) 342if (IntPtr.Size == 4)
Microsoft.ML.FastTree (1)
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (1)
162_sizeOfReservedMemory += (long)IntPtr.Size * TrainData.NumFlocks;
Microsoft.Private.Windows.Core (2)
src\winforms\src\Microsoft.Private.Windows.Polyfills\system\NativeIntExtensions.cs (2)
14public static nint MinValue => IntPtr.Size == 4 19public static nint MaxValue => IntPtr.Size == 4
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\Helpers\NativeMethods.vb (1)
45If (IntPtr.Size = 4) Then ' 32-bit platforms
Microsoft.Win32.SystemEvents (1)
Microsoft\Win32\SystemEvents.cs (1)
423if (IntPtr.Size == 4)
Mono.Cecil (1)
Mono.Cecil\AssemblyReader.cs (1)
1381 size = IntPtr.Size;
PresentationFramework (14)
MS\Internal\Printing\PrintDlgExMarshaler.cs (1)
694return IntPtr.Size == sizeof(long);
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (6)
143m._array = Marshal.AllocCoTaskMem(length * IntPtr.Size); 210data = Marshal.AllocCoTaskMem(length * IntPtr.Size); 640var byte_length = length * IntPtr.Size; 698var byte_length = length * IntPtr.Size; 726var byte_length = length * IntPtr.Size; 731bytes += IntPtr.Size;
System\Windows\Documents\InputScopeAttribute.cs (3)
84ppbstrPhrases = Marshal.AllocCoTaskMem(IntPtr.Size * count); 105offset += IntPtr.Size; 111offset += IntPtr.Size;
System\Windows\Standard\NativeMethods.cs (4)
2363IntPtr currArg = Marshal.ReadIntPtr(argv, i * IntPtr.Size); 2779if (8 == IntPtr.Size) 2935if (8 == IntPtr.Size) 2966if (8 == IntPtr.Size)
PresentationUI (1)
MS\Internal\Documents\Application\CommandEnforcer.cs (1)
135if ((!_isRMMissing) && (IntPtr.Size == 4))
ReachFramework (4)
PrintConfig\FallbackPTProvider.cs (4)
748IntPtr pPrinterName = Marshal.ReadIntPtr(ptr, 1 * IntPtr.Size); 755IntPtr pPortName = Marshal.ReadIntPtr(ptr, 3 * IntPtr.Size); 762IntPtr pDriverName = Marshal.ReadIntPtr(ptr, 4 * IntPtr.Size); 769IntPtr pDevMode = Marshal.ReadIntPtr(ptr, 7 * IntPtr.Size);
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
128return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
System.Collections (2)
System\Collections\Generic\OrderedDictionary.cs (2)
1088if (IntPtr.Size == 8) 1144if (IntPtr.Size == 8)
System.Collections.Concurrent (2)
System\Collections\Concurrent\PartitionerStatic.cs (2)
1659Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 1660chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System.Collections.Immutable (1)
System\Collections\Frozen\Constants.cs (1)
81|| ((typeof(T) == typeof(nint) || typeof(T) == typeof(nuint)) && IntPtr.Size == 4);
System.Data.Odbc (16)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
573internal static readonly int PtrSize = IntPtr.Size;
Common\System\Data\ProviderBase\DbBuffer.cs (5)
317Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 342ValidateCheck(offset, IntPtr.Size); 593Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 616ValidateCheck(offset, IntPtr.Size); 617Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
System\Data\Odbc\OdbcDataReader.cs (5)
2351buffer.PtrOffset(256, IntPtr.Size).Handle); 2427buffer.PtrOffset(256, IntPtr.Size).Handle); 2521IntPtr colnameActual = buffer.PtrOffset(colnameActualOffset, IntPtr.Size).Handle; 2522IntPtr indexActual = buffer.PtrOffset(indexActualOffset, IntPtr.Size).Handle; 2523IntPtr ordinalActual = buffer.PtrOffset(ordinalActualOffset, IntPtr.Size).Handle;
System\Data\Odbc\OdbcParameter.cs (3)
786_preparedValueOffset = _preparedIntOffset + IntPtr.Size; 787parameterBufferSize += (cbParameterSize + IntPtr.Size); 808HandleRef intBuffer = parameterBuffer.PtrOffset(_preparedIntOffset, IntPtr.Size);
System\Data\Odbc\OdbcParameterCollection.cs (2)
125parameterBufferSize = (parameterBufferSize + (IntPtr.Size - 1)) & ~(IntPtr.Size - 1); // align buffer;
System.Data.OleDb (63)
DbBindings.cs (5)
183_dbbindings[_index].obLength = (IntPtr)(_dataBufferSize + IntPtr.Size); 184_dbbindings[_index].obValue = (IntPtr)(_dataBufferSize + IntPtr.Size + IntPtr.Size); 185_dataBufferSize += IntPtr.Size + IntPtr.Size;
DbPropSet.cs (1)
142int cProperties = Marshal.ReadInt32(ptr, offset + IntPtr.Size);
OleDb_Enum.cs (4)
132private static readonly NativeDBType D_BSTR = new NativeDBType(0xff, IntPtr.Size, false, false, OleDbType.BSTR, NativeDBType.BSTR, S_BSTR, typeof(string), NativeDBType.BSTR, DbType.String); // 2 - integer4 (pointer) 147private static readonly NativeDBType D_IDispatch = new NativeDBType(0xff, IntPtr.Size, true, false, OleDbType.IDispatch, NativeDBType.IDISPATCH, S_IDISPATCH, typeof(object), NativeDBType.IDISPATCH, DbType.Object); // 17 - integer4 (pointer) 148private static readonly NativeDBType D_IUnknown = new NativeDBType(0xff, IntPtr.Size, true, false, OleDbType.IUnknown, NativeDBType.IUNKNOWN, S_IUNKNOWN, typeof(object), NativeDBType.IUNKNOWN, DbType.Object); // 18 - integer4 (pointer) 166private static readonly NativeDBType D_Chapter = new NativeDBType(0xff, IntPtr.Size, false, false, OleDbType.Empty, NativeDBType.HCHAPTER, S_UDT, typeof(IDataReader), NativeDBType.HCHAPTER, DbType.Object); // 36 - (hierarchical chaper)
OleDbDataReader.cs (4)
1606maxLen = IntPtr.Size; 1623maxLen = IntPtr.Size; 1643maxLen = IntPtr.Size; 2316if (4 == IntPtr.Size)
OleDbParameter.cs (3)
335bytecount = IntPtr.Size; 399bytecount = IntPtr.Size; 418bytecount = IntPtr.Size;
OleDbWrapper.cs (5)
41IntPtr method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // GetDataSource is the 4'th vtable entry 156method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // Initialize is the 4'th vtable entry 186method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // CreateSession is the 4'th vtable entry 350method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); 384IntPtr method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size);
PropertyIDSet.cs (2)
12private static readonly int PropertyIDSetAndValueSize = ODB.SizeOf_tagDBPROPIDSET + IntPtr.Size; // sizeof(tagDBPROPIDSET) + sizeof(int) 28Marshal.WriteInt32(base.handle, IntPtr.Size, /*propertyid count*/1);
PropertyInfoSet.cs (1)
123int infoCount = Marshal.ReadInt32(ptr, offset + IntPtr.Size);
RowBinding.cs (15)
49Debug.Assert(_bindingCount * 3 * IntPtr.Size <= _dataLength, "_dataLength too small"); 242Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 243ValidateCheck(offset, 2 * IntPtr.Size); 261Marshal.WriteIntPtr(base.handle, offset + IntPtr.Size, ptr); 281Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 282ValidateCheck(offset, 2 * IntPtr.Size); 300Marshal.WriteIntPtr(base.handle, offset + IntPtr.Size, pinnedValue); // original parameter value 408ValidateCheck(valueOffset, 2 * IntPtr.Size); 417ValidateCheck(valueOffset, 2 * IntPtr.Size); 491IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + IntPtr.Size); 504Marshal.WriteIntPtr(buffer, valueOffset + IntPtr.Size, IntPtr.Zero); 520IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + IntPtr.Size); 530Marshal.WriteIntPtr(buffer, valueOffset + IntPtr.Size, IntPtr.Zero); 567ValidateCheck(offset, IntPtr.Size); 568Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
SafeHandles.cs (2)
86internal RowHandleBuffer(nint rowHandleFetchCount) : base(checked((int)rowHandleFetchCount * IntPtr.Size)) 92IntPtr value = ReadIntPtr(index * IntPtr.Size);
System\Data\Common\AdapterUtil.cs (1)
1262if (4 == IntPtr.Size)
System\Data\ProviderBase\DbBuffer.cs (16)
62Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 120Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 153Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 212Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 264Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 290Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 315ValidateCheck(offset, IntPtr.Size); 316Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 361Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 409Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 435Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 490Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 540Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 566Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 589ValidateCheck(offset, IntPtr.Size); 590Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
System\Data\ProviderBase\DbConnectionPool.cs (4)
233public PoolWaitHandles() : base(3 * IntPtr.Size) 257WriteIntPtr(SEMAPHORE_HANDLE * IntPtr.Size, _poolHandle.DangerousGetHandle()); 258WriteIntPtr(ERROR_HANDLE * IntPtr.Size, _errorHandle.DangerousGetHandle()); 259WriteIntPtr(CREATION_HANDLE * IntPtr.Size, _creationHandle.DangerousGetHandle());
System.Diagnostics.DiagnosticSource (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Diagnostics.Process (1)
System\Diagnostics\Process.Linux.cs (1)
175switch (IntPtr.Size)
System.DirectoryServices (11)
System\DirectoryServices\ActiveDirectory\Exception.cs (2)
461tempPtr = Marshal.ReadIntPtr(errorInfo, i * IntPtr.Size); 488addr = Marshal.ReadIntPtr(collision.Entries, i * IntPtr.Size);
System\DirectoryServices\ActiveDirectory\ForestTrustRelationshipInformation.cs (6)
110records = Marshal.AllocHGlobal(count * IntPtr.Size); 141Marshal.WriteIntPtr(records, IntPtr.Size * currentCount, tmpPtr); 170Marshal.WriteIntPtr(records, IntPtr.Size * currentCount, tmpPtr); 203Marshal.WriteIntPtr(records, IntPtr.Size * currentCount, tmpPtr); 229Marshal.WriteIntPtr(records, IntPtr.Size * currentCount, tmpPtr); 374addr = Marshal.ReadIntPtr(trustInfo.Entries, i * IntPtr.Size);
System\DirectoryServices\ActiveDirectory\TrustHelper.cs (1)
360ptr = Marshal.AllocHGlobal(IntPtr.Size);
System\DirectoryServices\ActiveDirectory\Utils.cs (2)
123IntPtr ptr = Marshal.AllocHGlobal(IntPtr.Size); 217IntPtr ptr = Marshal.AllocHGlobal(IntPtr.Size);
System.DirectoryServices.Protocols (15)
System\DirectoryServices\Protocols\common\BerConverter.cs (2)
565IntPtr ptr = Marshal.ReadIntPtr(berValArray, IntPtr.Size * i); 615tempPtr = Marshal.ReadIntPtr(ptrResult, i * IntPtr.Size);
System\DirectoryServices\Protocols\common\utils.cs (2)
44IntPtr intPtrArray = Marshal.AllocHGlobal(IntPtr.Size * size); 47IntPtr tempPtr = (IntPtr)((long)intPtrArray + IntPtr.Size * i);
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (9)
776IntPtr tempPtr = Marshal.ReadIntPtr(serverControlArray, IntPtr.Size * i); 809IntPtr tempPtr = Marshal.ReadIntPtr(clientControlArray, IntPtr.Size * i); 843IntPtr tempPtr = Marshal.ReadIntPtr(modArray, IntPtr.Size * i); 869IntPtr tempPtr = Marshal.ReadIntPtr(searchAttributes, IntPtr.Size * i); 1659singleControl = Marshal.ReadIntPtr(tempControlPtr, i * IntPtr.Size); 1782IntPtr tempPtr = Marshal.ReadIntPtr(valuesArray, IntPtr.Size * count); 1796tempPtr = Marshal.ReadIntPtr(valuesArray, IntPtr.Size * count); 1825tempPtr = Marshal.ReadIntPtr(referenceArray, IntPtr.Size * count); 1832tempPtr = Marshal.ReadIntPtr(referenceArray, IntPtr.Size * count);
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (2)
676IntPtr tempPtr = Marshal.ReadIntPtr(serverControlArray, IntPtr.Size * i); 709IntPtr tempPtr = Marshal.ReadIntPtr(clientControlArray, IntPtr.Size * i);
System.Drawing.Common (1)
System\Drawing\Imaging\EncoderParameter.cs (1)
330EncoderParameterValueType.ValueTypePointer => IntPtr.Size,
System.IO.Compression (1)
System\IO\Compression\ZipArchiveEntry.cs (1)
597private static readonly bool s_allowLargeZipArchiveEntriesInUpdateMode = IntPtr.Size > 4;
System.IO.MemoryMappedFiles (5)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (4)
295if (IntPtr.Size == 4 && capacity > uint.MaxValue) 352if (IntPtr.Size == 4 && capacity > uint.MaxValue) 411if (IntPtr.Size == 4 && size > uint.MaxValue) 445if (IntPtr.Size == 4 && size > uint.MaxValue)
System\IO\MemoryMappedFiles\MemoryMappedView.cs (1)
86if (IntPtr.Size == 4 && newSize > uint.MaxValue)
System.Linq (3)
System\Linq\Lookup.cs (3)
132if (IntPtr.Size == 8) 214return IntPtr.Size == 8 263if (IntPtr.Size == 8)
System.Linq.AsyncEnumerable (3)
System\Linq\ToLookupAsync.cs (3)
279if (IntPtr.Size == 8) 357return IntPtr.Size == 8 408if (IntPtr.Size == 8)
System.Linq.Parallel (5)
System\Linq\Parallel\Scheduling\Scheduling.cs (2)
88Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 89chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System\Linq\Parallel\Utils\HashLookup.cs (3)
40if (IntPtr.Size == 8) 123return IntPtr.Size == 8 136if (IntPtr.Size == 8)
System.Management (2)
System\Management\ManagementObject.cs (2)
1475ppwbemCallResult = Marshal.AllocHGlobal(IntPtr.Size); 1768ppwbemCallResult = Marshal.AllocHGlobal(IntPtr.Size);
System.Net.Http (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpRequestCallback.cs (1)
282uint certHandleSize = (uint)IntPtr.Size;
System.Net.HttpListener (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Net.Mail (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Net.NetworkInformation (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Net.Primitives (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Net.Quic (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Net.Security (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Net.WebClient (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Numerics.Tensors (4)
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (4)
767private static bool IsUInt32Like<T>() => typeof(T) == typeof(uint) || (IntPtr.Size == 4 && typeof(T) == typeof(nuint)); 770private static bool IsInt32Like<T>() => typeof(T) == typeof(int) || (IntPtr.Size == 4 && typeof(T) == typeof(nint)); 773private static bool IsUInt64Like<T>() => typeof(T) == typeof(ulong) || (IntPtr.Size == 8 && typeof(T) == typeof(nuint)); 776private static bool IsInt64Like<T>() => typeof(T) == typeof(long) || (IntPtr.Size == 8 && typeof(T) == typeof(nint));
System.Private.CoreLib (85)
Internal\Runtime\Augments\RuntimeAugments.cs (2)
149Debug.Assert(value.GetMethodTable()->ValueTypeSize == IntPtr.Size); 347return length / IntPtr.Size;
Internal\Runtime\ThreadStatics.cs (1)
131if (typeTlsIndex < (length / IntPtr.Size))
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\CompilerHelpers\StartupCodeHelpers.cs (1)
149Debug.Assert(length % IntPtr.Size == 0);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\LowLevelStringConverter.cs (2)
35StringBuilder sb = new StringBuilder(IntPtr.Size * 4); 38int shift = IntPtr.Size * 8;
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\MethodTable.cs (6)
1154uint cbOffset = (uint)(sizeof(MethodTable) + (IntPtr.Size * _usNumVtableSlots)); 1159uint relativeOrFullPointerOffset = (IsDynamicType || !SupportsRelativePointers ? (uint)IntPtr.Size : 4); 1237cbOffset += (uint)IntPtr.Size; 1248cbOffset += (uint)IntPtr.Size; 1257cbOffset += (uint)IntPtr.Size; 1265cbOffset += (uint)IntPtr.Size;
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\TransitionBlock.cs (1)
563return ((offset - GetOffsetOfArgumentRegisters()) / IntPtr.Size);
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (7)
1323if (IntPtr.Size == 4) 1327if (IntPtr.Size == 4) 1835if (IntPtr.Size == 4) 2062if (IntPtr.Size == 4) 2270if (IntPtr.Size == 4) 2475if (IntPtr.Size == 4) 2479if (IntPtr.Size == 4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (4)
2227if (IntPtr.Size == 8) 2244if (IntPtr.Size == 8) 2279if (IntPtr.Size == 8) 2686return IntPtr.Size == 8;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (1)
663return IntPtr.Size == 4 ? TypeCode.Int32 : TypeCode.Int64;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipePayloadDecoder.cs (1)
34payload = payload.Slice(IntPtr.Size);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
1840else if (IntPtr.Size == 4 && dataType == typeof(IntPtr)) 1900else if (IntPtr.Size == 8 && dataType == typeof(IntPtr))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (2)
152public static TraceLoggingTypeInfo IntPtr() => s_intptr ??= new ScalarArrayTypeInfo(typeof(IntPtr[]), Statics.IntPtrType, System.IntPtr.Size); 153public static TraceLoggingTypeInfo UIntPtr() => s_uintptr ??= new ScalarArrayTypeInfo(typeof(UIntPtr[]), Statics.UIntPtrType, System.IntPtr.Size);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (3)
32public static readonly TraceLoggingDataType IntPtrType = IntPtr.Size == 8 35public static readonly TraceLoggingDataType UIntPtrType = IntPtr.Size == 8 38public static readonly TraceLoggingDataType HexIntPtrType = IntPtr.Size == 8
src\runtime\src\libraries\System.Private.CoreLib\src\System\Environment.cs (1)
209public static bool Is64BitProcess => IntPtr.Size == 8;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (1)
27int ret = Interop.Kernel32.LCMapStringEx(cultureName, Interop.Kernel32.LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
671nint signMask = (value ^ sign) >> ((Size * 8) - 1);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (8)
1945if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1954if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 2016if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 2025if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 2087if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 2096if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 2158if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 2167if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint)))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (4)
303(typeof(T) == typeof(nint) && nint.Size == 4)) 311(typeof(T) == typeof(nuint) && nint.Size == 4)) 320(typeof(T) == typeof(nuint) && nint.Size == 8) || 433return nint.Size == 8
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (7)
27if (IntPtr.Size == 4) 29Debug.Assert(variantSize == (4 * IntPtr.Size)); 33Debug.Assert(IntPtr.Size == 8); 34Debug.Assert(variantSize == (3 * IntPtr.Size)); 405or VarEnum.VT_CLSID or VarEnum.VT_STREAM or VarEnum.VT_STREAMED_OBJECT or VarEnum.VT_STORAGE or VarEnum.VT_STORED_OBJECT or VarEnum.VT_CF or VT_VERSIONED_STREAM, _) when sizeof(T) == nint.Size => rawValue, 412_ when vt.HasFlag(VarEnum.VT_BYREF) && sizeof(T) == nint.Size => rawValue, 414_ when vt.HasFlag(VarEnum.VT_ARRAY) && sizeof(T) == nint.Size => rawValue,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
91if (IntPtr.Size == 4 && numBytes > uint.MaxValue)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.Unix.cs (1)
12return IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
34private static int HashShiftPerElement => IntPtr.Size == 8 ? 2 : 1;
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (1)
374int maxLength = IntPtr.Size == 4 ? 1_000_000_000 : int.MaxValue;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (2)
317if (IntPtr.Size >= 8 && (elementCount - i) >= (nuint)(8 / sizeof(TFrom))) 427if (IntPtr.Size < 8 || !Vector128.IsHardwareAccelerated)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (3)
1360if (IntPtr.Size >= 8) 1403if (IntPtr.Size >= 8) 1463if (IntPtr.Size >= 8)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (4)
559if (IntPtr.Size >= 8) 591if (IntPtr.Size >= 8) 642if (IntPtr.Size >= 8) 702if (IntPtr.Size >= 8)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (1)
465if (IntPtr.Size >= 8 && BitConverter.IsLittleEndian)
System\Exception.NativeAot.cs (1)
229int cbBuffer = sizeof(SERIALIZED_EXCEPTION_HEADER) + (nStackTraceElements * IntPtr.Size);
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (1)
419return nint.Size;
System\Runtime\InteropServices\Marshal.NativeAot.cs (1)
24return IntPtr.Size;
System\Runtime\InteropServices\PInvokeMarshal.cs (1)
131ContextData = (IntPtr)NativeMemory.AllocZeroed((nuint)(2 * IntPtr.Size));
System\Runtime\ThunkPool.cs (11)
45public static readonly int ThunkDataSize = 2 * IntPtr.Size; 49public static readonly uint PageSize = BitOperations.RoundUpToPowerOf2((uint)Math.Max(ThunkCodeSize * NumThunksPerBlock, ThunkDataSize * NumThunksPerBlock + IntPtr.Size)); 98*(IntPtr*)(thunkDataBlock + (int)(Constants.PageSize - IntPtr.Size)) = commonStubAddress; 99Debug.Assert(*(IntPtr*)(thunkDataBlock + (int)(Constants.PageSize - IntPtr.Size)) == commonStubAddress); 132*(IntPtr*)(thunkDataBlock + (int)(Constants.PageSize - IntPtr.Size)) = _commonStubAddress; 133Debug.Assert(*(IntPtr*)(thunkDataBlock + (int)(Constants.PageSize - IntPtr.Size)) == _commonStubAddress); 175*((IntPtr*)(nextAvailableThunkPtr + IntPtr.Size)) = IntPtr.Zero; 199*((IntPtr*)(dataAddress + IntPtr.Size)) = new IntPtr(-1); 270target = *((IntPtr*)(dataAddress + IntPtr.Size)); 289*((IntPtr*)(dataAddress + IntPtr.Size)) = target; 351*((IntPtr*)(dataAddress + IntPtr.Size)) = new IntPtr(-1);
System.Private.DataContractSerialization (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Private.Reflection.Execution (1)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.MappingTables.cs (1)
734int fieldOffsetDelta = RuntimeAugments.IsValueType(declaringTypeHandle) ? IntPtr.Size : 0;
System.Private.TypeLoader (31)
Internal\Runtime\TypeLoader\EETypeCreator.cs (13)
55*(IntPtr*)((byte*)rtth.ToEETypePtr() + sizeof(MethodTable) + dictionarySlot * IntPtr.Size) = dictionary; 185baseSize = IntPtr.Size + // sync block 1862 * IntPtr.Size + // EETypePtr + Length 243cbEEType += IntPtr.Size; 246int cbGCDescAligned = MemoryHelpers.AlignUp(cbGCDesc, IntPtr.Size); 295writableData = MemoryHelpers.AllocateMemory(WritableData.GetSize(IntPtr.Size)); 296NativeMemory.Clear(writableData, (nuint)WritableData.GetSize(IntPtr.Size)); 333threadStaticIndex = MemoryHelpers.AllocateMemory(IntPtr.Size * 2); 435return series > 0 ? (series + 2) * IntPtr.Size : 0; 502*ptr-- = (short)((i - last) * IntPtr.Size); 527*ptr-- = (short)((first + bitfield.Length - last) * IntPtr.Size); 531*baseOffsetPtr = (void*)(baseOffset * IntPtr.Size); 644return sizeof(MethodTable) + dictionarySlot * IntPtr.Size;
Internal\Runtime\TypeLoader\GenericDictionary.cs (3)
51_addressOfFirstCellSlot = MemoryHelpers.AllocateMemory(checked((int)(_cells.Length * IntPtr.Size))); 71void* dictionaryWithHeader = MemoryHelpers.AllocateMemory(checked((int)((_cells.Length + 1) * IntPtr.Size))); 77_addressOfFirstCellSlot = (byte*)dictionaryWithHeader + IntPtr.Size;
Internal\Runtime\TypeLoader\LowLevelStringConverter.cs (1)
113return LowLevelToString((ulong)arg, IntPtr.Size * 8);
Internal\Runtime\TypeLoader\TypeBuilder.cs (4)
489int capacity = _size / IntPtr.Size - 2; 494int offs = (int)*ptr-- / IntPtr.Size - 1; 495int len = ((int)*ptr-- + _size) / IntPtr.Size; 729ushort componentSize = (ushort)IntPtr.Size;
Internal\Runtime\TypeLoader\TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs (1)
425IntPtr dictionaryHeader = IntPtr.Subtract(methodDictionary, IntPtr.Size);
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\MethodTable.cs (8)
496return numArguments * IntPtr.Size; 1154uint cbOffset = (uint)(sizeof(MethodTable) + (IntPtr.Size * _usNumVtableSlots)); 1159uint relativeOrFullPointerOffset = (IsDynamicType || !SupportsRelativePointers ? (uint)IntPtr.Size : 4); 1237cbOffset += (uint)IntPtr.Size; 1248cbOffset += (uint)IntPtr.Size; 1257cbOffset += (uint)IntPtr.Size; 1265cbOffset += (uint)IntPtr.Size; 1303(IntPtr.Size * cVirtuals) +
src\runtime\src\coreclr\nativeaot\Common\src\Internal\Runtime\TransitionBlock.cs (1)
563return ((offset - GetOffsetOfArgumentRegisters()) / IntPtr.Size);
System.Private.Uri (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Private.Windows.Core (2)
Windows\Win32\System\Variant\VARIANT.cs (2)
129return IntPtr.Size == 8 ? (ulong)data : (object)(uint)data; 742return (uint)IntPtr.Size;
System.Private.Xml (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Reflection.Metadata (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Runtime.Caching (1)
System\Runtime\Caching\CacheMemoryMonitor.cs (1)
92bool is64bit = (IntPtr.Size == 8);
System.Runtime.Numerics (75)
System\Number.BigInteger.cs (7)
28private static ReadOnlySpan<nuint> UInt32PowersOfTen => nint.Size == 8 592if (nint.Size == 8) 1111if (nint.Size == 8) 1196private static ReadOnlySpan<int> Indexes => nint.Size == 8 ? Indexes64 : Indexes32; 1274private static ReadOnlySpan<nuint> LeadingPowers1E9 => nint.Size == 8 1537if (nint.Size == 8) 1571static virtual int DigitsPerBlock => nint.Size * 8 / TParser.BitsPerDigit;
System\Numerics\BigInteger.cs (47)
121if (nint.Size == 8) 145if (nint.Size == 8) 224if (nint.Size == 8) 281if (nint.Size == 8) 406int wholeLimbCount = Math.DivRem(byteCount, nint.Size, out int unalignedBytes); 428value.Slice(0, wholeLimbCount * nint.Size).CopyTo(MemoryMarshal.AsBytes(val.AsSpan())); 622else if (nint.Size == 4 && value[0] == UInt32HighBit) 639else if (nint.Size == 8) 704else if (nint.Size == 4) 737if (nint.Size == 4) 1012if (nint.Size == 8) 1092else if (nint.Size == 4 && rightBits.Length == 2) 1259int maxLimbs = sizeof(long) / nint.Size; 1267if (nint.Size == 8) 1293int maxLimbs = sizeof(long) / nint.Size; 1299if (nint.Size == 8) 1324int maxLimbs = sizeof(long) / nint.Size; 1333if (nint.Size == 8) 1361int maxLimbs = sizeof(long) / nint.Size; 1369if (nint.Size == 8) 1566int bytesPerLimb = nint.Size; 1834if (nint.Size == 8) 2102if (nint.Size == 8) 2279int maxLimbs = sizeof(long) / nint.Size; 2287if (nint.Size == 8) 2319int maxLimbs = 16 / nint.Size; 2328if (nint.Size == 8) 2419int maxLimbs = sizeof(long) / nint.Size; 2425if (nint.Size == 8) 2447int maxLimbs = 16 / nint.Size; 2454if (nint.Size == 8) 2563if (nint.Size == 8) 2630else if (nint.Size == 8) 3849dest = dest.Slice(nint.Size); 3857bool needsSignExtension = byteCount > bits.Length * nint.Size; 3865dest = dest.Slice(nint.Size); 3891dest = dest.Slice(nint.Size); 3927dest = dest.Slice(nint.Size); 3935bool needsSignExtension = byteCount > bits.Length * nint.Size; 3960dest = dest.Slice(nint.Size); 3987return nint.Size; 3990int result = bits.Length * nint.Size; 4009result += nint.Size; 5075if (nint.Size == 8) 5116if (nint.Size == 8) 5269if (nint.Size == 8) 5310if (nint.Size == 8)
System\Numerics\BigIntegerCalculator.GcdInv.cs (6)
16if (nint.Size == 8) 120while (right.Length > (nint.Size == 4 ? 2 : 1)) 226if (nint.Size == 4) 252if (nint.Size == 4) 291if (nint.Size == 4) 400if (nint.Size == 4)
System\Numerics\BigIntegerCalculator.PowMod.cs (4)
170bool useUlong = nint.Size == 4 || modulus <= uint.MaxValue; 214bool useUlong = nint.Size == 4 || modulus <= uint.MaxValue; 662int iterations = nint.Size == 8 ? 6 : 5; 690if (nint.Size == 8)
System\Numerics\BigIntegerCalculator.ShiftRot.cs (1)
119int wordsPerLimb = nint.Size / sizeof(uint);
System\Numerics\BigIntegerCalculator.SquMul.cs (3)
160if (nint.Size == 8) 807if (nint.Size == 8) 883if (nint.Size == 8)
System\Numerics\BigIntegerCalculator.Utils.cs (7)
17get => nint.Size * 8; 111if (nint.Size == 8) 135if (nint.Size == 8) 159if (nint.Size == 8) 226if (nint.Size == 8) 277if (nint.Size == 8) 332if (nint.Size == 8)
System.Security.Cryptography (3)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (1)
139int cbData = IntPtr.Size;
System\Security\Cryptography\CngKey.StandardProperties.cs (1)
283Interop.NCrypt.NCryptSetProperty(_keyHandle, KeyPropertyName.ParentWindowHandle, &value, IntPtr.Size, CngPropertyOptions.None);
System.Security.Cryptography.Pkcs (2)
Internal\Cryptography\Pal\Windows\PkcsPalWindows.cs (1)
220int cbSize = IntPtr.Size;
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Security.Cryptography.Xml (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Speech (1)
Recognition\RecognizerBase.cs (1)
881if (IntPtr.Size == 8 && // 64-bit system
System.Text.Encodings.Web (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Text.Json (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Text.RegularExpressions (3)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System\Text\RegularExpressions\RegexCompiler.cs (2)
6107if (IntPtr.Size == 8 && analysis.OnlyRanges && (analysis.UpperBoundExclusiveIfOnlyRanges - analysis.LowerBoundInclusiveIfOnlyRanges) <= 64) 6534Ldc(index * IntPtr.Size);
System.Text.RegularExpressions.Generator (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\ParallelRangeManager.cs (2)
114if (IntPtr.Size == 4 && _use32BitCurrentIndex) 254_use32BitCurrentIndex = IntPtr.Size == 4 && nRangeSize <= int.MaxValue;
System.Web.HttpUtility (1)
src\runtime\src\libraries\Common\src\System\HexConverter.cs (1)
557if (IntPtr.Size == 8)
System.Windows.Forms (2)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (2)
1427ptrToFree = Marshal.AllocHGlobal((nint)(sizeToAllocate + (IntPtr.Size - 1))); 1567nuint add = (nuint)(alignment ?? IntPtr.Size) - 1;
System.Windows.Forms.Primitives (1)
Windows\Win32\UI\Controls\ToolInfoWrapper.cs (1)
14private static uint TTTOOLINFO_V2_Size => IntPtr.Size == 4 ? 44u : 64u;
UIAutomationClient (2)
MS\Internal\Automation\Misc.cs (1)
401if (IntPtr.Size == 4)
System\Windows\Automation\Condition.cs (1)
60IntPtr mem = Marshal.AllocCoTaskMem(conditions.Length * IntPtr.Size);
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
154if (IntPtr.Size == sizeof(int))
MS\Win32\UnsafeNativeMethods.cs (1)
374if (IntPtr.Size == 4)