Why do extra heap allocations happen? #90073
Replies: 2 comments 1 reply
-
Reproduces even with TieredCompilatipn=0, codegen for both |
Beta Was this translation helpful? Give feedback.
-
@timcassell is right, it's not BDN fault as the Engine itself does not allocate any managed memory (dotnet/BenchmarkDotNet#1542) You need to use a memory profiler to find out. VS Memory Profiler disables Tiered JIT by default, so you need to use PerfView or some other profiler. For PerfView, you need to use the .NET Alloc CheckBox:
If you can not find any allocations, some old bug like #7638 can be back |
Beta Was this translation helpful? Give feedback.
-
Hi Experts!
I'm playing with the following code, benchmarking heap allocations and comparing performance of heap vs stack allocations.
Test
method has no meaning except it accesses the array, reading and writing elements from it:When I'm changing the Cycles const I see the following results:
Cycles = 10:
Cycles = 100:
Cycles = 1000:
So my question is: why does CLR allocate extra few bytes on the heap?
Beta Was this translation helpful? Give feedback.
All reactions