Multiple projects within solution

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Multiple projects within solution

Postby StephenT » Fri Jul 15, 2011 4:17 pm

I am running the memory profiler looking for a memory leak, the problem is that the actual leak is happening in a different project then the one the profiler is defaulting to when I click "Profile Memory".

As a result (since the running project does almost no work) I am not really seeing any of my memory in use. Is there anyway to see the entire solution instead of just one project?
StephenT
 
Posts: 3
Joined: Fri Jul 15, 2011 4:11 pm

Postby dom.smith » Fri Jul 15, 2011 5:31 pm

Hi,

It sounds like you are using the ANTS Memory Profiler Visual Studio add-in? If the add-in starts the wrong project, try starting the Memory Profiler as a separate program (not using the add-in).

If you have several processes you want to profile together, this trick may help:
1. Create a batch file which starts all of the processes.
2. In ANTS Memory Profiler, profile that batch file & ensure that 'Profile child processes' is selected.

Did this help?

Dom.
Dominic Smith,
Project Manager,
Red Gate Software.
dom.smith
 
Posts: 94
Joined: Thu Jun 03, 2010 5:54 pm
Location: Cambridge, UK

Postby StephenT » Fri Jul 15, 2011 6:04 pm

Sorry I should of mentioned I am trying to profile a Silverlight app that only works when I am debugging from visual studio or running it from the web. Local copies don't work.

The project that it is monitoring is the one that successfully handles the startup of the silverlight app for its web components.

Also all the projects are contained within the same solution.
StephenT
 
Posts: 3
Joined: Fri Jul 15, 2011 4:11 pm

Postby dom.smith » Mon Jul 18, 2011 5:21 pm

Hi,

I might have misunderstood, but you should still be able to profile the application from the ANTS Memory Profiler interface:
    1. Ensure that Internet Explorer is not currently running
    2. In the ANTS Memory Profiler interface, choose Silverlight 4 browser application
    3. In the Silverlight application URL, enter the URL of the web page where the Silverlight application runs correctly. The page can be on a remote server.
    4. The Silverlight application is profiled
Just to clarify, the Visual Studio add-in has no concept of the Visual Studio solution, and so you cannot select a different project in the solution.

Please let me know if this does not work for some reason.

Dom.[/list]
Dominic Smith,
Project Manager,
Red Gate Software.
dom.smith
 
Posts: 94
Joined: Thu Jun 03, 2010 5:54 pm
Location: Cambridge, UK

Postby StephenT » Mon Jul 18, 2011 9:17 pm

I tried this method but I found that a majority of the data was closed off from me as "Private Bytes". I could see about 6mb of data being used, but the leak was in the private bytes which I could not view. The private bytes started at 150mb and went up to 300mb but in the variables that I was able to see there was no significant change.

However, compared to just plain running ANTS from visual studio with default settings it did show more data. Just not the data I need.
StephenT
 
Posts: 3
Joined: Fri Jul 15, 2011 4:11 pm

Postby dom.smith » Mon Jul 18, 2011 9:53 pm

Hi,

In that case, it sounds as though your problem is in unmanaged memory: the main indication of an unmanaged memory leak is when the number of private bytes (the amount of real and paged memory requested by the program) increases while the number of bytes in the .NET heap does not grow as quickly.

If you have not already done so, please read Checking unmanaged memory usage, which might help you to find the problem.

If you are still experiencing problems after this, please let me know.

Dom.
Dominic Smith,
Project Manager,
Red Gate Software.
dom.smith
 
Posts: 94
Joined: Thu Jun 03, 2010 5:54 pm
Location: Cambridge, UK


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests