I need to trace objects that are allocated in a request. Is there any tool or command that can help me know how many bytes are allocated and when?
Asked
Active
Viewed 229 times
2

Mike Dunlavey
- 40,059
- 14
- 91
- 135

avihai marchiano
- 21
- 1
-
2Can you define 'request'. Are you talking about a web request in the context of ASP.NET? – Steven Aug 02 '11 at 11:18
-
Yes, please clarify. As far as general memory allocation goes, there are plenty of memory profiling tools out there that will tell you how large objects are (e.g. RedGate's memory profiler), but if you're just looking at something like a HTTP request, that's much more trivial. – dotnetnate Aug 02 '11 at 11:21
-
Yep- i mean to httprequest. i want to trace where i allocate objects in request scope. – avihai marchiano Aug 03 '11 at 20:58
2 Answers
2
I think Ants Memory Profiler can help you so much here, however it is not free, but they have a trial version "for 14 days or so", give it a shot.

Jalal Said
- 15,906
- 7
- 45
- 68
-
I installed ants and dottrace, however - i didnt find a function like this. i might missed it , or its not exists – avihai marchiano Aug 02 '11 at 11:40
-
1I doesn't expose a function to you, when you run your application in the debugger it will sample your memory usage after you stop the debugging and give you a full report on where the memory consumes more which function call or line and of course how much memory spent in each with the time... – Jalal Said Aug 02 '11 at 17:44
0
You can use the CLRProfiler sample to see this. Depending on your platform, there is a version for .NET 2 and one for .NET 4. And it is free!
It does pretty graphs/maps to show you where memory was allocated.

leppie
- 115,091
- 17
- 196
- 297
-
I tried , but i am getting a message "waiting to clr", and the message doesn't desapear. i google for a solution , but i dosnt success to solve this problem for me , so i gave up, but it seems that this is a good tool. – avihai marchiano Aug 02 '11 at 13:58