Remove hlsf, TLSF.alloc is ok

This commit is contained in:
Youmu Liu
2026-05-11 18:08:35 +08:00
parent 5706c89563
commit b59d414e20
21 changed files with 267 additions and 1514 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ namespace StgSharp.Benchmark
private readonly List<HlsfHandle> _hlsfLocalList = new();
private readonly List<nint> _libcLocalList = new();
private Random _random = new(42);
private HybridLayerSegregatedFitAllocator _hlsfAllocator = null!;
private TwoLayerSegregatedFitAllocator _hlsfAllocator = null!;
[GlobalCleanup]
public void Cleanup()
@@ -92,7 +92,7 @@ namespace StgSharp.Benchmark
{
_hlsfAllocator?.Dispose();
_random = new Random(42);
_hlsfAllocator = new HybridLayerSegregatedFitAllocator(GetArenaBytes(), align:(int)Alignment);
_hlsfAllocator = new TwoLayerSegregatedFitAllocator(GetArenaBytes(), align:(int)Alignment);
BuildIterationWorkload();
_hlsfLocalList.Clear();
_libcLocalList.Clear();
@@ -147,7 +147,7 @@ namespace StgSharp.Benchmark
private void RunHlsf(
int batch,
HybridLayerSegregatedFitAllocator allocator,
TwoLayerSegregatedFitAllocator allocator,
FreePolicy policy
)
{