Remove hlsf, TLSF.alloc is ok
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
using StgSharp.HighPerformance.ProcessorAbstraction;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using Hlsf = StgSharp.HighPerformance.Memory.HybridLayerSegregatedFitAllocator;
|
||||
using Tlsf = StgSharp.HighPerformance.Memory.TwoLayerSegregatedFitAllocator;
|
||||
|
||||
namespace StgSharp.HighPerformance.Memory
|
||||
{
|
||||
@@ -51,34 +51,33 @@ namespace StgSharp.HighPerformance.Memory
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 64, Pack = 16)]
|
||||
[StructLayout(LayoutKind.Explicit, Size = 64, Pack = 64)]
|
||||
private unsafe struct CacheLineHead
|
||||
{
|
||||
|
||||
[FieldOffset(0)] internal Hlsf.Entry AllocatorEntry;
|
||||
[FieldOffset(0)] internal Tlsf.Handle AllocatorEntry;
|
||||
[FieldOffset(0)] internal readonly M512 Buffer;
|
||||
|
||||
#region reference counting and state information
|
||||
|
||||
[FieldOffset(52)] internal int RefCount;
|
||||
[FieldOffset(60)] private readonly int Reverse;
|
||||
[FieldOffset(56)] internal readonly int Id;
|
||||
[FieldOffset(24)] internal int RefCount;
|
||||
[FieldOffset(28)] internal readonly int Id;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region hlsf entry alias
|
||||
|
||||
[FieldOffset(24)] public readonly nuint Address;
|
||||
[FieldOffset(16)] public readonly uint Size;
|
||||
[FieldOffset(8)] public readonly Ptr64 Address;
|
||||
[FieldOffset(16)] public readonly Ptr64 Size;
|
||||
|
||||
#endregion
|
||||
|
||||
#region cache line information
|
||||
|
||||
[FieldOffset(50)] internal short Predictor;
|
||||
[FieldOffset(48)] internal ushort Profile;
|
||||
[FieldOffset(40)] internal nuint Origin;
|
||||
[FieldOffset(32)] internal short Predictor;
|
||||
[FieldOffset(34)] internal ushort Profile;
|
||||
[FieldOffset(36)] internal nuint Origin;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user