diff --git a/Recyclable.Collections/RecyclableList.cs b/Recyclable.Collections/RecyclableList.cs index e9ad370..36588ca 100644 --- a/Recyclable.Collections/RecyclableList.cs +++ b/Recyclable.Collections/RecyclableList.cs @@ -257,7 +257,7 @@ namespace Recyclable.Collections } localInts[uninitializedBlocksCount] = newMemoryBlocksSpan.Length; - if (localInts[uninitializedBlocksCount] == localInts[requiredBlockCount]) + if (localInts[uninitializedBlocksCount] >= localInts[requiredBlockCount]) { if (minBlockSize >= RecyclableDefaults.MinPooledArrayLength) { diff --git a/Recyclable.CollectionsTests/RecyclableListTestData.cs b/Recyclable.CollectionsTests/RecyclableListTestData.cs index d1119d0..5f8b179 100644 --- a/Recyclable.CollectionsTests/RecyclableListTestData.cs +++ b/Recyclable.CollectionsTests/RecyclableListTestData.cs @@ -16,12 +16,13 @@ namespace Recyclable.CollectionsTests public static readonly IEnumerable ItemsCountVariants = new long[] { - 0, 1, 2, 3, 10, 16, 32, 64, 128, 256, 333, 512, 1_024, 8_192, 16_384 + 0, 1, 2, 3, 10, 16, 32, 64, 128, 256, 333, 512, 1_024, 8_192, 16_384, + 1_000_000 }; public static readonly IEnumerable BlockSizeVariants = new int[] { - 1, 2, 3, 10, 16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096, + 1, 2, 4, 8, 10, 16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096, 8_192, 16_384 };