mat
This commit is contained in:
@@ -43,7 +43,9 @@ namespace StgSharp.HighPerformance.Memory
|
||||
throw new OverflowException("Too many activated cache line in external reference.");
|
||||
}
|
||||
Span<CacheLinePrediction> span = new(_prediction, PredictionCount);
|
||||
if (!(PrefetchPredict.Predict(span, out int actualCount) && actualCount > 0)) {
|
||||
if (!PrefetchPredict.Predict(span, out int actualCount) && (actualCount <= 0))
|
||||
{
|
||||
_exhausted = true;
|
||||
return;
|
||||
}
|
||||
int missIndex = 0;
|
||||
@@ -85,7 +87,7 @@ namespace StgSharp.HighPerformance.Memory
|
||||
head->_origin = address;
|
||||
head->_profile = handle.MapPolicy;
|
||||
head->_refCount = 0;
|
||||
head->_address = (nuint)(&_data[index]);
|
||||
head->_address = nuint & _data[index];
|
||||
|
||||
// pre fetch them here
|
||||
PrefetchPredict.Prefetch(head->_origin, head->_profile, new Span<byte>((byte*)head->_address, Unsafe.SizeOf<CacheLineData>()));
|
||||
|
||||
Reference in New Issue
Block a user