L4 is now on new algo, using new eviction arrays, using union of hlsf and cache line head.

This commit is contained in:
Youmu Liu
2026-04-23 17:39:38 +08:00
parent 5252be9436
commit 1a6ce24a27
5 changed files with 117 additions and 97 deletions
@@ -35,10 +35,18 @@ namespace StgSharp.HighPerformance.Memory
{
[InlineArray(CacheLineCount)]
private struct EvictionArray
private struct PredictionArray
{
private byte pprv;
private short PredictionCount;
}
[InlineArray(CacheLineCount)]
private struct MapArray
{
private short MapCount;
}
@@ -51,8 +59,8 @@ namespace StgSharp.HighPerformance.Memory
#region reference counting and state information
[FieldOffset(52)] internal int RefCount;
[FieldOffset(56)] internal int RemainingPredictionCount;
[FieldOffset(60)] internal int Id;
[FieldOffset(60)] private readonly int Reverse;
[FieldOffset(56)] internal int Id;
#endregion