Skip to content

Commit 48796e0

Browse files
committed
t
1 parent adbbf8e commit 48796e0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/BenchmarkDotNet/Engines/Engine.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,11 @@ private void GcDump(string key)
250250
GcStats gcStats;
251251
using (FinalizerBlocker.MaybeStart())
252252
{
253-
before = GC.GetAllocatedBytesForCurrentThread();
254-
253+
before = GC.GetTotalAllocatedBytes(true);
255254
gcStats = MeasureWithGc(data.workloadAction, data.invokeCount / data.unrollFactor);
256-
257-
after = GC.GetAllocatedBytesForCurrentThread();
255+
after = GC.GetTotalAllocatedBytes(true);
258256
}
259257

260-
261258
exceptionsStats.Stop(); // this method might (de)allocate
262259
var finalThreadingStats = ThreadingStats.ReadFinal();
263260

0 commit comments

Comments
 (0)