2

Are there any tools for memory profiling of applications that consist of C# and Delphi parts?

These two parts cannot be started separately - its one Application. C# and Delphi communicate via COM with each others.

Update I have tried dotTrace Memory 3.5 - application crashed with Exception in clr.dll. I can start the application via profiler - choice Mark Memory - the crash occur if I want to get a snapshot.

MikroDel
  • 6,705
  • 7
  • 39
  • 74
  • 1
    What exactly are you looking for? How would a correct solution look like? For example, on the Delphi side, what are you looking for: graphics of allocations and deallocations of memory vs time? Reports of leaked memory? How about the .net side? – Cosmin Prund Feb 19 '13 at 22:35
  • http://stackoverflow.com/q/291631/62576 and http://stackoverflow.com/q/10644/62576 – Ken White Feb 19 '13 at 23:02
  • @CosminPrund - correct is any solution with the opprortunity for me to profile memory of my application. "Gaphics of allocations and deallocations" will be ok. – MikroDel Feb 20 '13 at 07:08

2 Answers2

4

I assume you compile them separately, which means that they can be profiled separately. Depending on your version of delphi, AQTime comes with it for gross profiling from the debugger.

I can't really help with the C# portion, but I assume profilers exist, perhaps in Microsofts own tool chain, that can also be run from the IDE.

Gregor Brandt
  • 7,659
  • 38
  • 59
  • 1
    +1 - they may a single application communicating via COM but they still have different memory management systems and so need profiling separately – Justin Feb 19 '13 at 22:39
  • @Justin - "they may a single application communicating via COM" thats true. "they still have different memory management systems and so need profiling separately" How can I profile C# part separately if I cannot start it separately? – MikroDel Feb 20 '13 at 08:04
  • @Gregor Brandt - the same comment as for Justin ) - How can I profile C# part separately if I cannot start it separately? – MikroDel Feb 20 '13 at 08:05
  • give you +1 for the try to help me ) – MikroDel Feb 20 '13 at 09:09
  • @MikroDel Just profile it as you would any other C# application. Ideally you will be able to attach both profilers to the same application at the same time, however in reality you are probably going to have to run the same application twice and try to perform the same steps each time. – Justin Feb 20 '13 at 09:56
  • @Justin - I have updated my question - application crash is the result if I try to profile it with dotTrace Memory 3.5 – MikroDel Feb 20 '13 at 09:58
  • @MikroDel If you are having a problem with a specific memory profiler then it might be best to ask a separate question (or raise it with the vendors of that software) as otherwise this question kind of becomes a moving target – Justin Feb 20 '13 at 10:10
  • @Justin - my question is what I want to know - "Memory profiling of C# application with COM". After I have got some answers - I have tried to use some advices from this answers. So I dont see it as the "moving target" problem – MikroDel Feb 20 '13 at 10:17
1

dotTrace Memory or Scitech memory profiler for .NET and AQTime or FastMM for Delphi, just use them together. I don't know any integrated solution.

Dmitry Osinovskiy
  • 9,999
  • 1
  • 47
  • 38
  • thank you for your answer. I know that there are some memory profiles for Delphi and C# that can be found with google. My question was not about which product are there for each programming language, but how to use them in my situation. – MikroDel Feb 20 '13 at 08:00
  • I don't understand a problem. You just take FastMM, include it in your Delphi project, turn on required options for memory profiling. Then start dotTrace Memory and select main executable to profile (for example, if your C# part is a dll, then select Delphi .exe file). Then you just get two reports from two profilers. – Dmitry Osinovskiy Feb 20 '13 at 09:08
  • give you +1 for the try to help me ) – MikroDel Feb 20 '13 at 09:09