diff --git a/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs b/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs index 2a414f869f..d6badf9282 100644 --- a/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs +++ b/src/ImageSharp/Memory/Allocators/MemoryAllocator.cs @@ -38,10 +38,13 @@ public abstract class MemoryAllocator /// Gets the maximum allowed total allocation size, in bytes, for the current process. /// /// - /// The allocation limit is determined based on the process architecture. For 64-bit processes, - /// the limit is higher than for 32-bit processes. + /// 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.
+ /// 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. ///
- internal long AccumulativeAllocationLimitBytes { get; private protected set; } = Environment.Is64BitProcess ? 8L * OneGigabyte : 2L * OneGigabyte; + internal long AccumulativeAllocationLimitBytes { get; private protected set; } = long.MaxValue; /// /// Gets the maximum size, in bytes, that can be allocated for a single buffer.