468,272 Members | 2,020 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

About memory usage

I've made a testing program to test the memory usage of some Data Forms.
I create a MDI parent form with one single MDI child form, which is a Data
Form generated by .NET Data Form Wizard.

To test the stuff, I keep to open that child data form for about 10 times.
the memory usage shown in GC and task manager both increase.

Then I close all those forms. and perform GC collect. The memory usage shown
in GC falls, however, the memory usage shown in task manager keeps unchanged.

May I know if there's any method I could really release the memory used?
what exactly cache or unreleased in the memory? DataSet?

Need help. Thanks!
Nov 22 '05 #1
2 1680
Jarvis,

When you will search these dotNet newsgroups you will see thousands of
messages which say, don't look at your taskmanager for your memory because
that does not give the right information.

Than on your and others next question "How can I manage my own memory?.
There are long threads of messages, which ends mostly with "Don't bother
about it, because that is the reason it is managed code".

I hope this helps,

Cor
Nov 22 '05 #2
CMM
The Task Manager mem usage has been one of the most misunderstood elements of
Windows for years and years. The mem usage (or "working set" I believe) says
nothing about how much memory a program is actually using... only how much
memory Windows is currently allotting to it in RAM. This can shrink and grow
as windows pages things in and out of memory. The program could be using 2k
of 10mb that Windows has given it. If Windows needs that memory back it'll
just shrink or swap out part of the set.... and vice versa.

When a program first loads it in essense requests a block of memory. Some
programs (compiled with the "tiny" directives in C++) request less. Others
request more. In addition the dll's loaded up may request additional storage
also. But, it doesn't mean they actually use it. In fact, most of the time,
they don't. And if they need "more" Windows gives it to them by taking it
away (swapping it out) from other programs or shrinking the disk cache.

"Jarvis" wrote:
I've made a testing program to test the memory usage of some Data Forms.
I create a MDI parent form with one single MDI child form, which is a Data
Form generated by .NET Data Form Wizard.

To test the stuff, I keep to open that child data form for about 10 times.
the memory usage shown in GC and task manager both increase.

Then I close all those forms. and perform GC collect. The memory usage shown
in GC falls, however, the memory usage shown in task manager keeps unchanged.

May I know if there's any method I could really release the memory used?
what exactly cache or unreleased in the memory? DataSet?

Need help. Thanks!

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mike Peretz | last post: by
2 posts views Thread by tomvr | last post: by
2 posts views Thread by Jarvis | last post: by
20 posts views Thread by Philip Carnstam | last post: by
7 posts views Thread by Rich Denis | last post: by
1 post views Thread by kiplring | last post: by
1 post views Thread by Frank Rizzo | last post: by
1 post views Thread by yzghan | last post: by
5 posts views Thread by Ian Boyd | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.