By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,983 Members | 1,627 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,983 IT Pros & Developers. It's quick & easy.

About memory usage

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.