Jump to content
  • Advertisement

Archived

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

Yaskil

Used Memory Size by an App.

This topic is 5745 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

How can i learn how much physical memory used by my application. Is there any function provided with winapi ? There is such a function like GlobalMemoryStatus() but it queries the total system memory. Contrary i need to monitor the memory usage of my application/thread. How can i query that ? Life is beautiful

Share this post


Link to post
Share on other sites
Advertisement
if you are using windows 2000 or XP for your development you can see the memory profile in the task manager:

- press ctrl + shift + esc
- go to processes tab
- sort by memory usage
- ...
- profit

If your application is of a reasonable size it will probably be the topmost process.

I hope this is what you''re looking for.

______________________________
"A computer is meant to be a big calculator, not a storage device"
Struct.m33p.net

Share this post


Link to post
Share on other sites
Is this Windows NT/2000/XP or 95/98/ME? The answers are very different in both cases.

Let''s assume NT/2000/XP for now. You can use the GetProcessMemoryInfo in the psapi library (#include <psapi.h> and link with psapi.lib).

However, I have to question the value of the data you''ll get from this function, unless it''s only to print out as a message to the user. Why do you want to know how much memory you''re using?

Don''t forget this is the amount of memory Windows has given your app. This is not neccesarily how much memory you application is actively using. A delete will only release memory back to Windows when it gets over a certain threshold and happens solely at the descretion of the runtime libraries.

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

Share this post


Link to post
Share on other sites
The project i am working on handles large amount of data in the memory. So it is working on my system, but i want to know how much mem used by my application to calculate minimum system requirements, that is why i actually need it

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!