Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


how to check memory usage?

This topic is 5396 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I often hear people who suspect that they have a memory leak because there is less memory available before they run their program then afterwords. First of all, even if the program did have a memory leak, I though that all moder operating systems reclaim the memory after your program is finished anyway. Im using windoze, and i dont know how you can check how much memory is being used anyway. I can ctrl-alt-del to bring up the task manager, which shows how much memory is being used by the computer, but this is constantly changing, even if my program is not running. So how can you accurately tell that there is less memory available after your program has run? Basically I want to know a good way to tell how much memory my program is using, and I want to know if these other people are simply using the task manager to figure it out, or if i am badly mistaken. Thanks!

Share this post

Link to post
Share on other sites
There are various ways, such as the windows inbuilt performance monitor (found in control panel, set it to monitor your program's threads only), or use a debugger.

%SystemRoot%\system32\perfmon.msc /s

Debuggers usually telly rather quickly about memory leaks.

the actual problem with memory leaks is that some of them are growing, so in a loop, it may heppen that after a few hours (sometimes seconds) or so, your system will run out of memory - and crash, or at least the program crashes.

Very nasty.

Moritz "Thygrrr" Voß

[edited by - Thygrrr on October 9, 2003 9:42:51 AM]

Share this post

Link to post
Share on other sites
There is a good free GDI/memory checker, called Memproof - not sure where the link is but it helps with unfreed resources and memory.

I fseek, therefore I fam.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!