Remove id from L4 head, and other some useless types.
This commit is contained in:
@@ -35,22 +35,6 @@ namespace StgSharp.HighPerformance.Memory
|
||||
public partial class L4
|
||||
{
|
||||
|
||||
[InlineArray(CacheLineCount)]
|
||||
private struct PredictionArray
|
||||
{
|
||||
|
||||
private int PredictionCount;
|
||||
|
||||
}
|
||||
|
||||
[InlineArray(CacheLineCount)]
|
||||
private struct MapArray
|
||||
{
|
||||
|
||||
private int MapCount;
|
||||
|
||||
}
|
||||
|
||||
internal enum AllocationState : byte
|
||||
{
|
||||
|
||||
@@ -60,25 +44,32 @@ namespace StgSharp.HighPerformance.Memory
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 64, Pack = 64)]
|
||||
[StructLayout(LayoutKind.Explicit, Size = 32, Pack = 32)]
|
||||
private unsafe struct CacheLineMetadata
|
||||
{
|
||||
|
||||
#region reference counting and state information
|
||||
|
||||
[FieldOffset(24)] internal int RefCount;
|
||||
|
||||
// [FieldOffset(28)] internal readonly short Id;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region tlsf area
|
||||
|
||||
// TLSF area use only 24 bytes
|
||||
|
||||
internal const ulong Mask48Bits = 0x0000FFFFFFFFFFFF;
|
||||
|
||||
[FieldOffset(0)] private readonly M512 FillingMask;
|
||||
[FieldOffset(0)] private readonly M256 FillingMask;
|
||||
|
||||
[FieldOffset(8)] private ulong PositionMask;
|
||||
[FieldOffset(16)] private ulong SizeMask;
|
||||
|
||||
[FieldOffset(14)] internal AllocationState State;
|
||||
|
||||
// [FieldOffset(15)] internal sbyte Level;
|
||||
|
||||
[FieldOffset(0)] public short NextLevel;
|
||||
[FieldOffset(2)] public short NextNear;
|
||||
[FieldOffset(4)] public short PreviousLevel;
|
||||
@@ -106,19 +97,12 @@ namespace StgSharp.HighPerformance.Memory
|
||||
|
||||
#endregion
|
||||
|
||||
#region reference counting and state information
|
||||
|
||||
[FieldOffset(24)] internal int RefCount;
|
||||
[FieldOffset(28)] internal readonly short Id;
|
||||
|
||||
#endregion
|
||||
|
||||
#region cache line information
|
||||
|
||||
[FieldOffset(34)] internal ushort Profile;
|
||||
[FieldOffset(36)] internal nuint Origin;
|
||||
[FieldOffset(24)] internal nuint Origin;
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
||||
Reference in New Issue
Block a user