Skip to content

Commit 3bf061d

Browse files
author
Alex Peck
committed
direct
1 parent 84459c0 commit 3bf061d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

BitFaster.Caching/Lfu/CmSketchCore.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ private void EnsureCapacity(long maximumSize)
127127
// over alloc by 4 to give 32 bytes padding, tableAddr is then aligned to 32 bytes
128128
const int pad = 4;
129129
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;
130+
131+
tableAddr = (long*)Unsafe.AsPointer(ref table[0]);
132+
//long pointer = (long)Unsafe.AsPointer(ref table[0]);
133+
//tableAddr = (long*)pointer + pointer % 32;
132134
blockMask = (int)((uint)(table.Length-pad) >> 3) - 1;
133135
#else
134136
table = new long[Math.Max(BitOps.CeilingPowerOfTwo(maximum), 8)];

0 commit comments

Comments
 (0)