fix: Fixes STArray size and tests (#1737)

This commit is contained in:
Kamron Batman 2024-04-23 16:18:24 -07:00 committed by GitHub
parent 3a27ab8810
commit 7a160bb0fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 8 deletions

View file

@ -36,12 +36,11 @@ public class STArrayPoolTests
{
STArrayPool<byte>.Shared.ResetForTesting();
var cores = Environment.ProcessorCount;
var arrays1 = new byte[cores * 8 + 2][]; // 1 for the cache, and 8 * CPU for the stacks
var weakReferences1 = new WeakReference[cores * 8 + 2];
var arrays1 = new byte[32 + 2][]; // 1 for the cache, 32 for the cores, and 1 for overflow
var weakReferences1 = new WeakReference[32 + 2];
var arrays2 = new byte[cores * 8 + 2][]; // 1 for the cache, and 8 * CPU for the stacks
var weakReferences2 = new WeakReference[cores * 8 + 2];
var arrays2 = new byte[32 + 2][];
var weakReferences2 = new WeakReference[32 + 2];
for (var i = 0; i < arrays1.Length; i++)
{