From 88acf75b11fc588ce820678cb9c3e45b527fc6ff Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 11 May 2026 15:34:28 +1000 Subject: [PATCH] Address feedback --- src/ImageSharp/Memory/Allocators/MemoryAllocator.cs | 8 ++++---- .../Memory/Allocators/MemoryAllocatorOptions.cs | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs b/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs index 48ae8a479d..8ea6659e64 100644 --- a/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs +++ b/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs @@ -35,12 +35,12 @@ public abstract class MemoryAllocator internal long MemoryGroupAllocationLimitBytes { get; private protected set; } = Environment.Is64BitProcess ? 4L * OneGigabyte : OneGigabyte; /// - /// Gets the maximum allowed total allocation size, in bytes, for the current process. + /// Gets the maximum cumulative size, in bytes, of all active allocations made through this allocator instance. /// /// - /// Defaults to , effectively imposing no limit on total allocations. - /// This property can be set to enforce a cap on total memory usage across all allocations made through this allocator instance, providing - /// a safeguard against excessive memory consumption.
+ /// Defaults to , effectively imposing no limit on the cumulative total. + /// When set, this provides a safeguard against excessive memory consumption by capping the combined size of + /// outstanding allocations issued by this instance.
/// When the cumulative size of active allocations exceeds this limit, an will be thrown to /// prevent further allocations and signal that the limit has been breached. ///
diff --git a/src/ImageSharp/Memory/Allocators/MemoryAllocatorOptions.cs b/src/ImageSharp/Memory/Allocators/MemoryAllocatorOptions.cs index 3339203dac..e02dff6f1b 100644 --- a/src/ImageSharp/Memory/Allocators/MemoryAllocatorOptions.cs +++ b/src/ImageSharp/Memory/Allocators/MemoryAllocatorOptions.cs @@ -49,8 +49,9 @@ public struct MemoryAllocatorOptions } /// - /// Gets or sets a value defining the maximum total size that can be allocated by the allocator in Megabytes. - /// means platform default: 2GB on 32-bit processes, 8GB on 64-bit processes. + /// Gets or sets a value defining the maximum cumulative size, in Megabytes, of all active allocations made + /// through the created instance. + /// (the default) imposes no limit on the cumulative total. /// public int? AccumulativeAllocationLimitMegabytes {