some chore

This commit is contained in:
Youmu Liu
2026-03-12 18:13:41 +08:00
parent 0c1887d8f8
commit c1c1a16627
5 changed files with 120 additions and 112 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
@@ -63,15 +63,19 @@ namespace StgSharp.HighPerformance.Memory
{
ref CacheLinePrediction handle = ref span[i];
nuint address = handle.Address;
nuint mapPtr = _cacheLineAllocator.Allocate();
CacheLineHead* head = (CacheLineHead*)_entryAllocator.Allocate();
if (!TryGetEmptyLine(out int index)) {
throw new OverflowException("L4 has no empty cache line.");
}
CacheLineHead* head = &_head[index];
// pre fetch them here
}
}
private partial bool TestHit(nuint origin)
private partial bool TestHit(
nuint origin
)
{
if (_map.TryGet(origin, out nuint handle))
{