Browse Source

EnableLogging -> EnableNonThreadSafeLogging

af/UniformUnmanagedMemoryPoolMemoryAllocator-02-MemoryGuards
Anton Firszov 5 years ago
parent
commit
4c9dfc9000
  1. 2
      tests/ImageSharp.Tests/Memory/DiscontiguousBuffers/MemoryGroupTests.Allocate.cs
  2. 2
      tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs
  3. 2
      tests/ImageSharp.Tests/TestUtilities/TestMemoryAllocator.cs

2
tests/ImageSharp.Tests/Memory/DiscontiguousBuffers/MemoryGroupTests.Allocate.cs

@ -194,7 +194,7 @@ namespace SixLabors.ImageSharp.Tests.Memory.DiscontiguousBuffers
public void MemoryAllocatorIsUtilizedCorrectly(AllocationOptions allocationOptions) public void MemoryAllocatorIsUtilizedCorrectly(AllocationOptions allocationOptions)
{ {
this.MemoryAllocator.BufferCapacityInBytes = 200; this.MemoryAllocator.BufferCapacityInBytes = 200;
this.MemoryAllocator.EnableLogging(); this.MemoryAllocator.EnableNonThreadSafeLogging();
HashSet<int> bufferHashes; HashSet<int> bufferHashes;

2
tests/ImageSharp.Tests/Processing/Processors/Transforms/ResizeTests.cs

@ -117,7 +117,7 @@ namespace SixLabors.ImageSharp.Tests.Processing.Processors.Transforms
int workingBufferSizeHintInBytes = workingBufferLimitInRows * destSize.Width * SizeOfVector4; int workingBufferSizeHintInBytes = workingBufferLimitInRows * destSize.Width * SizeOfVector4;
var allocator = new TestMemoryAllocator(); var allocator = new TestMemoryAllocator();
allocator.EnableLogging(); allocator.EnableNonThreadSafeLogging();
configuration.MemoryAllocator = allocator; configuration.MemoryAllocator = allocator;
configuration.WorkingBufferSizeHintInBytes = workingBufferSizeHintInBytes; configuration.WorkingBufferSizeHintInBytes = workingBufferSizeHintInBytes;

2
tests/ImageSharp.Tests/TestUtilities/TestMemoryAllocator.cs

@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Tests.Memory
protected internal override int GetBufferCapacityInBytes() => this.BufferCapacityInBytes; protected internal override int GetBufferCapacityInBytes() => this.BufferCapacityInBytes;
public void EnableLogging() public void EnableNonThreadSafeLogging()
{ {
this.allocationLog = new List<AllocationRequest>(); this.allocationLog = new List<AllocationRequest>();
this.returnLog = new List<ReturnRequest>(); this.returnLog = new List<ReturnRequest>();

Loading…
Cancel
Save