Skip to content
Permalink
Browse files

Do not use LINQ over the array

  • Loading branch information...
ndrwrbgs committed Jun 5, 2018
1 parent baf6c19 commit ffe469c3e456d55f2f0e65ad73c77a2a1757c48b
Showing with 26 additions and 2 deletions.
  1. +26 −2 src/RecyclableMemoryStreamManager.cs
@@ -183,12 +183,36 @@ public RecyclableMemoryStreamManager(int blockSize, int largeBufferMultiple, int
/// <summary>
/// Number of bytes in large pool not currently in use
/// </summary>
public long LargePoolFreeSize => this.largeBufferFreeSize.Sum();
public long LargePoolFreeSize
{
get
{
long sum = 0;
foreach (long freeSize in this.largeBufferFreeSize)
{
sum += freeSize;
}

return sum;
}
}

/// <summary>
/// Number of bytes currently in use by streams from the large pool
/// </summary>
public long LargePoolInUseSize => this.largeBufferInUseSize.Sum();
public long LargePoolInUseSize
{
get
{
long sum = 0;
foreach (long inUseSize in this.largeBufferInUseSize)
{
sum += inUseSize;
}

return sum;
}
}

/// <summary>
/// How many blocks are in the small pool

0 comments on commit ffe469c

Please sign in to comment.
You can’t perform that action at this time.