Remove more fixed buffers and replace them with InlineArray#125574
Remove more fixed buffers and replace them with InlineArray#125574EgorBo wants to merge 12 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
There was a problem hiding this comment.
Pull request overview
This PR continues the migration away from fixed buffers in structs by using C# inline arrays (InlineArray / InlineArrayN<T>) and span-based access patterns, primarily in interop and low-level encoding/networking code.
Changes:
- Replace
fixedbuffers with inline arrays (and conditional#if NETfallbacks where needed). - Update call sites to use span slicing / pointer casts compatible with inline-array-backed fields.
- Adjust a few Windows interop usages (WinHTTP connection info, RtlGetVersion / OS version string, time zone structs) to work with the new buffer representations.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilHeader.cs | Switch Webcil header magic to InlineArray4<byte> under #if NET. |
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilConverter.cs | Initialize WebcilHeader with default to support inline array field assignment. |
| src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.Ascii.cs | Replace fixed ulong[128] with an inline array buffer under #if NET. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | Update service-pack string construction for inline array buffer. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/UnixNetworkInterface.cs | Use inline-array-to-span slicing for MAC address extraction. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkInterfacePal.Android.cs | Update UTF-8 name marshalling to use pointer to inline array buffer. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs | Update interface name and address parsing to use inline-array-backed spans. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/IPAddressUtil.cs | Update native IP address span creation to slice from inline array. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs | Update gateway address creation to slice from inline array. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs | Update endpoint address parsing to slice from inline array. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs | Update physical/IP address parsing to slice from inline array. |
| src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs | Use inline-array-backed span for WinHTTP remote address under #if NET. |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs | Replace fixed address buffers with inline array buffers under #if NET. |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs | Replace fixed CSD string buffer with inline array under #if NET and adjust P/Invoke usage. |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs | Replace fixed timezone name buffers with inline arrays and update string accessors. |
| src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs | Replace fixed buffers in interface/address structs with InlineArrayN<T>. |
| src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs | Replace fixed endpoint address buffer with InlineArray16<byte>. |
There was a problem hiding this comment.
Pull request overview
This PR continues the ongoing effort to remove fixed buffers and unsafe string/pointer patterns by adopting C# inline arrays ([InlineArray] / InlineArrayN<T>) and span-based accessors across interop-heavy areas.
Changes:
- Replaced multiple fixed-size buffers in interop structs (WinHTTP, NtDll, Kernel32 timezone, msquic, Unix network info) with inline arrays.
- Updated call sites to use span conversions / slicing instead of pointer-based access and
Buffer.MemoryCopy. - Simplified a few APIs by removing
unsafewhere it’s no longer required (e.g., OS version string handling).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilHeader.cs | Replaces Webcil header fixed byte[4] with inline array under #if NET. |
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilConverter.cs | Initializes WebcilHeader to default to satisfy definite assignment with inline arrays. |
| src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.Ascii.cs | Switches the ASCII preescape table to an inline array buffer under #if NET. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | Removes pointer-based CSD version string creation in favor of span slicing. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs | Replaces several fixed buffers with inline array buffers in generated MsQuic interop structs. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs | Updates secret extraction to use span casts over inline array buffers. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/UnixNetworkInterface.cs | Uses span slicing + ToArray() instead of Buffer.MemoryCopy for MAC address copy. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkInterfacePal.Android.cs | Adjusts UTF-8 marshalling call to use pointer to inline array name buffer. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs | Updates name/address handling to work with inline array buffers and spans. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/IPAddressUtil.cs | Uses span cast + slicing over inline array buffers for IP creation. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs | Uses span cast + slicing over inline array buffers for gateway IP creation. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs | Migrates endpoint address creation to span slicing over inline array buffers. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs | Uses span cast + slicing over inline array buffers for IP/MAC creation. |
| src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs | Uses span access for WinHTTP remote address when inline arrays are enabled. |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs | Replaces fixed address buffers with [InlineArray(128)] when NET is defined. |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs | Converts fixed CSD version buffer to inline array (and updates P/Invoke to pointer-based signature). |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs | Replaces fixed char buffers with inline arrays and span-to-string helpers. |
| src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs | Replaces multiple Unix network fixed buffers with InlineArrayN<T> generics. |
| src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs | Replaces BSD endpoint fixed buffer with InlineArray16<byte>. |
...ies/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs
Outdated
Show resolved
Hide resolved
...ies/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs
Show resolved
Hide resolved
...ies/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs
Outdated
Show resolved
Hide resolved
...s/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.Ascii.cs
Outdated
Show resolved
Hide resolved
…fier - Fix checked cast syntax errors in BsdIPGlobalProperties.cs: (int] -> (int) - Restore 'unsafe' on AsciiPreescapedData struct for #else fixed buffer branch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR continues the repo-wide effort to replace fixed buffers with C# InlineArray-based representations, reducing unsafe usage while keeping the same native layouts for interop-heavy structs.
Changes:
- Replace multiple
fixedbuffer fields in interop structs withInlineArray*<T>or[InlineArray(N)]buffer structs (often under#if NET). - Update call sites to use span casts / slicing instead of pointer-based span construction or
Buffer.MemoryCopy. - Remove some
unsafeusages where no longer needed (e.g., OS version / timezone string extraction).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilHeader.cs | Replaces header magic fixed buffer with InlineArray on .NET builds. |
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilConverter.cs | Initializes WebcilHeader to default before writing InlineArray / fixed-buffer elements. |
| src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.Ascii.cs | Replaces a fixed ulong[128] buffer with an InlineArray-backed buffer under #if NET. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | Avoids pointer-based string construction by slicing the InlineArray-backed CSD version buffer. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs | Replaces several fixed buffers with InlineArray-backed buffers in MsQuic interop structs. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs | Updates TLS secret span creation to use InlineArray span casts + slicing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/UnixNetworkInterface.cs | Uses InlineArray span slicing + ToArray() for MAC address extraction. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkInterfacePal.Android.cs | Updates name marshalling to account for InlineArray name buffer. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs | Updates name, MAC, and IP address extraction for InlineArray buffers. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/IPAddressUtil.cs | Updates IP creation from native info to use InlineArray span slicing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs | Updates gateway address extraction for InlineArray span slicing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs | Updates endpoint IP parsing to use InlineArray span slicing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs | Updates MAC + IP address extraction to use InlineArray span slicing. |
| src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs | Uses InlineArray span conversion on .NET builds for WinHTTP sockaddr storage. |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs | Replaces fixed address buffers with InlineArray-backed buffer under #if NET. |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs | Switches to pointer-based LibraryImport + InlineArray-backed CSD buffer under #if NET. |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs | Replaces fixed timezone name buffers with InlineArray-backed buffers and span-based string extraction. |
| src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs | Replaces fixed buffers in Unix network enumeration interop structs with InlineArray*<T>. |
| src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs | Replaces fixed AddressBytes buffer with InlineArray16<byte>. |
src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs
Show resolved
Hide resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR continues the effort to reduce unsafe fixed buffers by replacing them with C# inline arrays (InlineArrayN<T> or [InlineArray(N)] buffers), primarily in interop structs and related call sites, so the code can rely more on spans and less on raw pointers.
Changes:
- Replace multiple fixed-size buffers in interop structs with inline arrays (including
InlineArray2/3/4/8/16<T>and custom[InlineArray(N)]buffers). - Update consumers to use span-based access patterns (casts to
Span<T>/ReadOnlySpan<T>, slicing) rather thanfixed+ pointer arithmetic. - Adjust a few APIs to no longer require
unsafeat the method level when it’s no longer needed.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilHeader.cs | Replace header magic fixed buffer with InlineArray4<byte> under #if NET. |
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilConverter.cs | Initialize WebcilHeader with default to support safe inline-array field initialization. |
| src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.Ascii.cs | Replace fixed ulong[128] with [InlineArray(128)] buffer on NET and update indexing. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | Remove unsafe usage and switch to span-based extraction of szCSDVersion. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs | Replace several fixed buffers with inline arrays / [InlineArray] buffers in generated MsQuic interop. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs | Update access to MsQuic TLS secret buffers using span casts + slicing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/UnixNetworkInterface.cs | Replace Buffer.MemoryCopy MAC extraction with span slicing + ToArray(). |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkInterfacePal.Android.cs | Adjust UTF-8 name marshalling to take address of inline-array field. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs | Update interface name/address parsing to use span casts over inline arrays. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/IPAddressUtil.cs | Use span slicing over inline array for IP address construction. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs | Use span slicing over inline array for gateway IP address construction. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs | Use span slicing over inline arrays for TCP/UDP endpoint parsing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs | Use span slicing over inline arrays for MAC and IP address parsing. |
| src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs | Use inline-array span access for WINHTTP_CONNECTION_INFO.RemoteAddress under #if NET. |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs | Replace WINHTTP_CONNECTION_INFO fixed buffers with [InlineArray(128)] buffers under #if NET. |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs | Replace fixed char buffer with inline array under #if NET; change P/Invoke to pointer + fixed. |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs | Replace timezone name/key fixed buffers with inline arrays and span-based string creation. |
| src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs | Replace multiple fixed buffers in unix network structs with InlineArrayN<T>. |
| src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs | Replace IPEndPointInfo.AddressBytes fixed buffer with InlineArray16<byte>. |
src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs
Show resolved
Hide resolved
…uicTlsSecret.cs Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR continues the repo-wide modernization effort to remove fixed buffers in favor of C# InlineArray patterns, reducing unsafe usage and simplifying buffer access across tasks, libraries, and interop layers.
Changes:
- Replaced multiple
fixedbuffers withInlineArray(or[InlineArray(N)]-annotated buffers) in interop structs and internal helpers. - Updated call sites to use span-based indexing/slicing for these buffers (e.g.,
ReadOnlySpan<T>/Span<T>conversions and range slicing). - Simplified some Windows string extraction from inline buffers by using
ReadOnlySpan<char>+ null-terminator search rather than pointer-basednew string(char*).
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilHeader.cs | Switches Webcil header magic ID storage from fixed to InlineArray on NET. |
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilConverter.cs | Initializes WebcilHeader with default for safe field writes after buffer change. |
| src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.Ascii.cs | Replaces a fixed ulong[128] with an inline-array buffer on NET and updates indexing. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | Removes pointer-based string creation for CSD version and uses span-based null-terminated slicing. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic_generated.cs | Replaces several msquic fixed buffers with inline-array buffers / InlineArray16<byte>. |
| src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs | Updates secret extraction to use spans over inline-array buffers with slicing to SecretLength. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/UnixNetworkInterface.cs | Simplifies link-layer address copying via span slicing + ToArray(). |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkInterfacePal.Android.cs | Updates name marshalling to work with inline-array Name storage. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs | Updates name and address span creation for inline-array fields. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/IPAddressUtil.cs | Updates IPAddress creation to slice spans from inline-array address buffers. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs | Updates gateway IP creation to slice spans from inline-array address buffers. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs | Updates endpoint IP creation to slice spans from inline-array address buffers. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs | Updates MAC and IP address span creation for inline-array buffers. |
| src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs | Uses span conversion for WINHTTP_CONNECTION_INFO.RemoteAddress on NET. |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs | Replaces fixed byte[128] address buffers with an inline-array buffer type on NET. |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs | Replaces a fixed char[128] buffer with inline-array storage on NET and updates P/Invoke signature usage. |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs | Replaces multiple fixed char[] buffers with inline-array buffers and uses span-based string creation. |
| src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs | Converts network interface interop structs from fixed buffers to InlineArrayN<T>. |
| src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs | Converts endpoint address buffer from fixed to InlineArray16<byte>. |
… more-fixed-buffers # Conflicts: # src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicTlsSecret.cs
e573d14 to
ac6c192
Compare
There was a problem hiding this comment.
Pull request overview
This PR continues the repo-wide migration away from fixed buffers, replacing remaining fixed-size buffers with C# inline arrays (either the built-in InlineArrayN<T> types or [InlineArray(N)]-annotated buffers) and updating call sites to use span-based access patterns.
Changes:
- Replace fixed buffers in several interop / header structs with inline array buffers under
#if NET(keepingfixedbuffers for non-NET targets where needed). - Update consumers to use span indexing / slicing for inline-array-backed buffers (e.g., MAC addresses, IP addresses, SOCKADDR storage, OS version strings).
- Minor safety / clarity adjustments related to definite assignment and null-terminated string extraction.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilHeader.cs | Switch Webcil header ID buffer to InlineArray4<byte> under #if NET. |
| src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilConverter.cs | Initialize WebcilHeader to default so inline-array element assignment is valid. |
| src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/OptimizedInboxTextEncoder.Ascii.cs | Replace fixed ulong[128] with [InlineArray(128)] buffer under #if NET and adjust indexing. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | Use span-based extraction of szCSDVersion rather than pointer-based string creation. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/UnixNetworkInterface.cs | Use span slicing over inline-array-backed native buffers to materialize MAC addresses. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkInterfacePal.Android.cs | Update UTF-8 name marshalling to take a byte* to the inline-array field. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/LinuxNetworkInterface.cs | Update native buffer reads (name / MAC / IP bytes) for inline arrays using spans. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/IPAddressUtil.cs | Update IPAddress creation from native inline-array-backed buffers via spans. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIpInterfaceProperties.cs | Update gateway address materialization to use span slicing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/BsdIPGlobalProperties.cs | Update endpoint address materialization to use span slicing. |
| src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs | Update MAC/IP address materialization to use span slicing. |
| src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestCallback.cs | Use inline-array span access for WINHTTP_CONNECTION_INFO.RemoteAddress under #if NET. |
| src/libraries/Common/src/Interop/Windows/WinHttp/Interop.winhttp_types.cs | Replace fixed byte[128] with [InlineArray(128)] buffers under #if NET. |
| src/libraries/Common/src/Interop/Windows/NtDll/Interop.RtlGetVersion.cs | Move OS version struct’s string buffer to inline array under #if NET and use pointer-based P/Invoke signature. |
| src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TimeZone.cs | Replace fixed char[] name buffers with inline arrays and use span-based string creation. |
| src/libraries/Common/src/Interop/Unix/System.Native/Interop.EnumerateInterfaceAddresses.cs | Replace fixed buffers in Unix native structs with InlineArrayN<T> buffers. |
| src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs | Replace fixed byte[16] endpoint buffer with InlineArray16<byte>. |
This PR replaces the remaining fixed buffers with InlineArrays. Very minor diffs.