diff --git a/osu.Framework.Benchmarks/BenchmarkFontLoading.cs b/osu.Framework.Benchmarks/BenchmarkFontLoading.cs index 25fc748722..282341b28a 100644 --- a/osu.Framework.Benchmarks/BenchmarkFontLoading.cs +++ b/osu.Framework.Benchmarks/BenchmarkFontLoading.cs @@ -21,7 +21,7 @@ public class BenchmarkFontLoading : BenchmarkTest public override void SetUp() { - SixLabors.ImageSharp.Configuration.Default.MemoryAllocator = ArrayPoolMemoryAllocator.CreateDefault(); + SixLabors.ImageSharp.Configuration.Default.MemoryAllocator = MemoryAllocator.Default; baseResources = new NamespacedResourceStore(new DllResourceStore(@"osu.Framework.dll"), @"Resources"); sharedTemp = new TemporaryNativeStorage("fontstore-test-" + Guid.NewGuid()); @@ -66,7 +66,7 @@ public void BenchmarkNoCache() [Benchmark] public void BenchmarkTimedExpiry() { - SixLabors.ImageSharp.Configuration.Default.MemoryAllocator = ArrayPoolMemoryAllocator.CreateDefault(); + SixLabors.ImageSharp.Configuration.Default.MemoryAllocator = MemoryAllocator.Default; using (var store = new TimedExpiryGlyphStore(baseResources, font_name)) runFor(store); diff --git a/osu.Framework/Platform/GameHost.cs b/osu.Framework/Platform/GameHost.cs index e6f2795a0e..0cf9f9255e 100644 --- a/osu.Framework/Platform/GameHost.cs +++ b/osu.Framework/Platform/GameHost.cs @@ -667,8 +667,8 @@ public void Run(Game game) if (LimitedMemoryEnvironment) { - // recommended middle-ground https://github.com/SixLabors/docs/blob/master/articles/ImageSharp/MemoryManagement.md#working-in-memory-constrained-environments - SixLabors.ImageSharp.Configuration.Default.MemoryAllocator = ArrayPoolMemoryAllocator.CreateWithModeratePooling(); + // recommended middle-ground https://github.com/SixLabors/docs/blob/main/articles/imagesharp/memorymanagement.md#configuring-the-pool-size + SixLabors.ImageSharp.Configuration.Default.MemoryAllocator = MemoryAllocator.Create(new MemoryAllocatorOptions { MaximumPoolSizeMegabytes = 1 }); } if (ExecutionState != ExecutionState.Idle)