Re: Memory increasing even when in debug-break



Hi John ,

Thanks for your detailed information, it is very helpful.

After performing some search in our internal database, I found some records
reporting memory leak problems with using
RegQueryValueEx+HKEY_PERFORMANCE_DATA. Normally, Performance
API results in loading all the performance DLLs registered on the system to
get loaded in the process address space and call their initialization
function. There is a possibility that these DLL"s includes third party perf
dll's that can potentially leak memory. Some public available links are
listed below:
"Sample Code to Detect Performance Services That Leak Memory"
http://support.microsoft.com/kb/296794
"FIX: SQL Performance Counters May Cause Handle Leak in WinLogon Process"
http://support.microsoft.com/kb/249343

Anyway, I do not think we should borther to find out what DLL is
responsibile for the link. One workaround is performing your task without
using PDH APIs. I would recommend you to p/invoke(www.pinvoke.net is a good
resource, however, it may contain some small errors) ToolHelp Win32 API to
enumerate the processes list, below are 2 Win32 samples:
http://support.microsoft.com/?id=187913
http://support.microsoft.com/?id=175030

If you have problem of doing the p/invoke stuff, please feel free to tell
me, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: Memory leaking when using CrystalReportViewer in an MDI applicatio
    ... Based on my experience, for memory issue in .net managed application, we ... need to determine whether the leak is in managed part or in native code. ... When you check the two counters in perfmon, ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.performance)
  • Re: Mapping memory of another process
    ... we can map the physical memory to the current process virtual space ... Let's say this remote thread loads an injected dll in that ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Memory Cleanup
    ... NET CLR will check if the memoery is low and garbage collection needs to ... If you really need the memory of an object to be released at once, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Trouble of GDI+ generic error!
    ... I got this error while printing something to printer in WinForm ... memory status. ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ADO.NET dataset limit
    ... the memory couldn't hold it what errors would be encountered? ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ... project analysis and dump analysis issues. ...
    (microsoft.public.dotnet.languages.vb)

Loading