L4 briefly pass unit test

This commit is contained in:
Youmu Liu
2026-03-17 20:31:06 +08:00
parent 98d711a3ca
commit dccb815811
13 changed files with 1710 additions and 32 deletions
@@ -2,8 +2,8 @@
// -----------------------------------------------------------------------
// file="L4.Prefetch"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -74,7 +74,7 @@ namespace StgSharp.HighPerformance.Memory
const int maxRetry = 1024;
while (!TryGetEmptyLine(out index))
{
missIndex = Evict(missIndex);
remain = Evict(remain);
retryCount++;
if (retryCount > maxRetry) {
throw new OverflowException($"Failed to evict cache line after {maxRetry} retries.");
@@ -94,7 +94,9 @@ namespace StgSharp.HighPerformance.Memory
_ = Interlocked.Add(ref _aheadCount, actualCount);
}
private partial bool TestHit(nuint origin)
private partial bool TestHit(
nuint origin
)
{
if (_map.TryGet(origin, out nuint handle))
{