Publish WMI instances from W32 service consumes memory without stop

  • Thread starter Thread starter Oscar Antezana
  • Start date Start date
O

Oscar Antezana

Hello to all,

I'm developing a Win32 .Net service that publishes information into WMI by
using Publish method, however once an instance is published, memory usage
starts to grow without stop at a rate of 1Kb/sec. This problem only appears
when publishing information through a service. Also I noticed that problem
only appears on some machines (most of them) since a couple of my machines
does not present the problem.

Is there a way to solve this problem? I'll try to create a native provider
and call it from the service but I prefer to use .Net and not to mix managed
and not managed code.

Best Regards,


Oscar
 
You simply publish it once and memory continues to grow at 1kB/sec?? Are
any WMI clients accessing the objects?

Are you sure nothing else is allocating the memory? Does the memory
continue to grow until the computer crashes?
 
Yes, once I publish the counter on a WMI table the memory does not stop to
grow. About the clients, it does not matter if there is a client accessing
the table, once the object is published the problem appears.

I'd like to note that this problem only appears when publish data from a
service, if the same code is executed as a normal application (console or
WinForms) the behavior is as expected. At this time I rewrite the publish
code using a standard COM Provider using C++ and publish the code from the
service and the problem does not appears, so it only happens when use the
..Net Framework library.

Oscar
 
Which Operating System and .NET Framework version is this happening on? Does
the problem go away if you call Instrumentation.Revoke() method? Can you
provide more details on what the counter is and by WMI table do you mean an
Instrumented WMI class?
 
Back
Top