L4 is now on new algo, using tricky way to init entryies

This commit is contained in:
Youmu Liu
2026-04-23 18:07:14 +08:00
parent 1a6ce24a27
commit 2f6617447c
4 changed files with 19 additions and 4 deletions
@@ -137,12 +137,14 @@ namespace StgSharp.HighPerformance.Memory
}
}
head = _head + index;
head->Id = index;
head->Origin = address;
head->Profile = pHandle.MapPolicy;
head->RefCount = 0;
head->Predictor = (short)predictIndex;
(*_predictCount)[index] = 1;
(*_mapCount)[index] = 1;
// pre fetch them here
predict.Prefetch(head->Origin, head->Profile, new Span<byte>((byte*)head->Address, (int)head->Size));
_ = _map.TryAddOrSet(address, (nuint)head, out _);