Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Unhinged/Engine/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public unsafe class Connection : IDisposable
/// Header data, no allocations
/// </summary>
public BinaryH1HeaderData BinaryH1HeaderData { get; set; }
public H1HeaderData H1HeaderData { get; set; }

public H1HeaderData H1HeaderData { get; set; } = null!;

/// <param name="maxConnections">Used to size the slabs (typically per-worker slab size).</param>
/// <param name="inSlabSize">Bytes per connection for receive.</param>
Expand All @@ -37,9 +38,9 @@ public Connection(int maxConnections, int inSlabSize, int outSlabSize)
{
//AlignedAlloc(size, 64) ensures your memory starts at an address that’s a multiple of 64,
//matching CPU cache-line size, reducing false sharing and improving SIMD/cache performance.
ReceiveBuffer = (byte*)NativeMemory.AlignedAlloc((nuint)(maxConnections * inSlabSize), 64);
ReceiveBuffer = (byte*)NativeMemory.AlignedAlloc((nuint)(inSlabSize), 64);
WriteBuffer = new FixedBufferWriter(
(byte*)NativeMemory.AlignedAlloc((nuint)(maxConnections * outSlabSize), 64),
(byte*)NativeMemory.AlignedAlloc((nuint)(outSlabSize), 64),
outSlabSize);
}

Expand Down
6 changes: 3 additions & 3 deletions Unhinged/Unhinged.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<Authors>Diogo Martins</Authors>
<RepositoryUrl>https://github.com/MDA2AV/Unhinged</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyVersion>9.0.6</AssemblyVersion>
<FileVersion>9.0.6</FileVersion>
<Version>9.0.6</Version>
<AssemblyVersion>9.0.7</AssemblyVersion>
<FileVersion>9.0.7</FileVersion>
<Version>9.0.7</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>Unhinged</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
Expand Down
Loading