.NET programs memory consumption

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I noticed that my windows application, very simple test written in C#, keeps
and keeps allocating memory.

For example, when at the start it has allocated 7500kB, after few minutes,
memory allocation is 12000kB. Even if i don't click any buttons or so. And
when i start clicking a button, with no event handling, it allocated 40k more
memory on every click. Is this normal? Why program needs extra memory after a
dummie button click?

I'm using .NET 2.0 and Visual C# Express, on WinXP Home with AMD64. Memory
figures are taken from task manager.
 
AIK said:
I noticed that my windows application, very simple test written in C#,
keeps
and keeps allocating memory.

For example, when at the start it has allocated 7500kB, after few minutes,
memory allocation is 12000kB. Even if i don't click any buttons or so. And
when i start clicking a button, with no event handling, it allocated 40k
more
memory on every click. Is this normal? Why program needs extra memory
after a
dummie button click?

I'm using .NET 2.0 and Visual C# Express, on WinXP Home with AMD64. Memory
figures are taken from task manager.

This is normal, the memory consumption will cease to climb at a certain
point, what you are experiencing is the result of JIT compilation and object
creation when clicking a button. Once all code in this execution path is
compiled the memory occupation will stabilize and the GC collector will take
care of the object clean-up (when he sees fit).

Willy.
 
Back
Top