Memory profiling

  • Thread starter Thread starter Duncan Mole
  • Start date Start date
D

Duncan Mole

Hi,

Is there any way to check memory allocations? I am losing memory and can
find no way of tracking down why, it may be an outstanding reference but I
can't see it.

Any suggestions?

Cheers
 
It looks like you are on the right track. The article "Developing Well
Performing .NET Compact Framework Applications" that you referred to is a
great reference. You mentioned Performance counter, but be sure to look at
the Performance statistics as well. You basically set a registry value and
run your application. An MSCOREE.stat file will then be created on the
device with system stats.

The article also comes with a sample application that can assist with
setting the registry value and reading the mscoree.stat file.

I will be discussing this in an upcoming MSDN Webcast titled "Tips, Tricks,
Tools and Best Practices for the .NET Compact Framework Developer" on
September 8th.
http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032257378&Culture=en-US


--
Tom Krueger
Microsoft Corporation
Program Manager
http://weblogs.asp.net/tom_krueger

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
Thanks Tom,

I'll tune in!

Tom Krueger said:
It looks like you are on the right track. The article "Developing Well
Performing .NET Compact Framework Applications" that you referred to is a
great reference. You mentioned Performance counter, but be sure to look at
the Performance statistics as well. You basically set a registry value and
run your application. An MSCOREE.stat file will then be created on the
device with system stats.

The article also comes with a sample application that can assist with
setting the registry value and reading the mscoree.stat file.

I will be discussing this in an upcoming MSDN Webcast titled "Tips, Tricks,
Tools and Best Practices for the .NET Compact Framework Developer" on
September 8th.
http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032257378&Culture=en-US


--
Tom Krueger
Microsoft Corporation
Program Manager
http://weblogs.asp.net/tom_krueger

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm



http://msdn.microsoft.com/mobility/default.aspx?pull=/library/en-us/dnnetcomp/html/netcfperf.asp
 
Thanks Daniel,

I have been using a combination of GC.Collect, GC.WaitForPendingFinalizers
and GC.GetTotalMemory as a way to log mem usage during my debugging.

I found the OpenNETCF.Desktop.Communication namespace after a bit of
searching on the web, must be a fairly new introduction as it isn't in the
version I have.
 
It's actually been around forever, but it's not part of the SDF since it's a
desktop namespace rather than a device namespace.

-Chris
 
Back
Top