Skip to content

Commit

Permalink
Move large static array out of hte large object heap
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi committed May 2, 2024
1 parent 21181a7 commit d89f21a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Compilers/Core/Portable/InternalUtilities/StringTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
using System.Threading;
using Microsoft.CodeAnalysis.PooledObjects;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Collections;


#if DEBUG
using System.Diagnostics;
Expand Down Expand Up @@ -63,7 +65,11 @@ private struct Entry
// slightly slower than local cache
// we read this cache when having a miss in local cache
// writes to local cache will update shared cache as well.
#if COMPILERCORE
private static readonly Entry[] s_sharedTable = new Entry[SharedSize];
#else
private static readonly SegmentedArray<Entry> s_sharedTable = new SegmentedArray<Entry>(SharedSize);
#endif

// essentially a random number
// the usage pattern will randomly use and increment this
Expand Down

0 comments on commit d89f21a

Please sign in to comment.