Browse Source

[SL.Core] Update descriptions on the ArrayPoolMemoryAllocator class

af/octree-no-pixelmap
daniaal 7 years ago
parent
commit
30a2ecfc23
  1. 16
      src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.CommonFactoryMethods.cs

16
src/SixLabors.Core/Memory/ArrayPoolMemoryAllocator.CommonFactoryMethods.cs

@ -42,26 +42,28 @@ namespace SixLabors.Memory
DefaultNormalPoolBucketCount); DefaultNormalPoolBucketCount);
} }
/// <summary> /// <summary>
/// For environments with limited memory capabilities. Only small images are pooled, which can result in reduced througput. /// For environments with very limited memory capabilities, only small buffers like image rows are pooled.
/// </summary> /// </summary>
/// <returns>The memory manager</returns> /// <returns>The memory manager</returns>
public static ArrayPoolMemoryAllocator CreateWithModeratePooling() public static ArrayPoolMemoryAllocator CreateWithMinimalPooling()
{ {
return new ArrayPoolMemoryAllocator(1024 * 1024, 32 * 1024, 16, 24); return new ArrayPoolMemoryAllocator(64 * 1024, 32 * 1024, 8, 24);
} }
/// <summary> /// <summary>
/// Only pool small buffers like image rows. /// For environments with limited memory capabilities, only small array requests are pooled, which can result in reduced throughput.
/// </summary> /// </summary>
/// <returns>The memory manager</returns> /// <returns>The memory manager</returns>
public static ArrayPoolMemoryAllocator CreateWithMinimalPooling() public static ArrayPoolMemoryAllocator CreateWithModeratePooling()
{ {
return new ArrayPoolMemoryAllocator(64 * 1024, 32 * 1024, 8, 24); return new ArrayPoolMemoryAllocator(1024 * 1024, 32 * 1024, 16, 24);
} }
/// <summary> /// <summary>
/// RAM is not an issue for me, gimme maximum througput! /// For environments where memory capabilities are not an issue, the maximum amount of array requests are pooled which results in optimal throughput.
/// </summary> /// </summary>
/// <returns>The memory manager</returns> /// <returns>The memory manager</returns>
public static ArrayPoolMemoryAllocator CreateWithAggressivePooling() public static ArrayPoolMemoryAllocator CreateWithAggressivePooling()

Loading…
Cancel
Save