We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84459c0 commit 3bf061dCopy full SHA for 3bf061d
BitFaster.Caching/Lfu/CmSketchCore.cs
@@ -127,8 +127,10 @@ private void EnsureCapacity(long maximumSize)
127
// over alloc by 4 to give 32 bytes padding, tableAddr is then aligned to 32 bytes
128
const int pad = 4;
129
table = GC.AllocateArray<long>(Math.Max(BitOps.CeilingPowerOfTwo(maximum), 8) + pad, true);
130
- long pointer = (long)Unsafe.AsPointer(ref table[0]);
131
- tableAddr = (long*)pointer + pointer % 32;
+
+ tableAddr = (long*)Unsafe.AsPointer(ref table[0]);
132
+ //long pointer = (long)Unsafe.AsPointer(ref table[0]);
133
+ //tableAddr = (long*)pointer + pointer % 32;
134
blockMask = (int)((uint)(table.Length-pad) >> 3) - 1;
135
#else
136
table = new long[Math.Max(BitOps.CeilingPowerOfTwo(maximum), 8)];
0 commit comments