Abort hlsf, goes back to tlsf, may use 'Arena-ed tlsf'

This commit is contained in:
Youmu Liu
2026-05-09 18:18:57 +08:00
parent d1aca8f745
commit 942933dcac
11 changed files with 653 additions and 21 deletions
@@ -71,6 +71,13 @@ namespace StgSharp.HighPerformance.ProcessorAbstraction
return value.GetHashCode();
}
public ulong GetLowerBits(
int bitCount
)
{
return value & ((1UL << bitCount) - 1);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public ref T Member<T>(
int index
@@ -79,6 +86,14 @@ namespace StgSharp.HighPerformance.ProcessorAbstraction
return ref Unsafe.As<byte, T>(ref buffer[index * sizeof(T)]);
}
public void SetLowerBits(
int bitCount,
ulong bits
)
{
value = (value & (~(1UL << bitCount))) | (bits & (1UL << bitCount);
}
public static bool operator !=(
M64 left,
M64 right