Jump to content
  • Advertisement

Archived

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

Jedyte

How do check how much RAM your program uses?

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

This may be a simple question but... how do check how much RAM your program uses? I''m using DJGPP 2.03 under Windows 98, if that matters.. Tnx!

Share this post


Link to post
Share on other sites
Advertisement
please post your replies, guys; i would like to know that, too! iam using visual c++, directX 7.0 if that matters

woody

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
On the current project I''m working on, we wrote a Memory Manager which overrides mallocs. Basically under the hood, you can do heap management and diagnostics to get your.

If you need a something to go off of, check this out:

http://www.fluidstudios.com/publications.html

-JT

Share this post


Link to post
Share on other sites
In Windows 2000, you run your program, and bring up task manager. That''ll give you a list of all processes running and the amount of memory being used. Under Win98, you might want to use Norton''s System Info (the one that comes with Windows sucks).

But if you do have to use the system info that comes with windows(under the start menu''s accessories->System Tools), look at the % of resources free before running your program, run your program and look at the % of free resources when your program is running. You should be able to calculate how much memory is being used.

Under Linux, I''ve no idea how.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
under linux just use your normal process manager to get the info

Share this post


Link to post
Share on other sites
Keep in mind that neither NT''s task manager, or ''top'' in Linux, are always 100% accurate.

~~~~~~~~~~
Martee

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
under linux just use your normal process manager to get the info



Could you elaborate? How do I start the process manager? (Linux newbie here....)

Share this post


Link to post
Share on other sites
''ps'' gives al processes, and their also something more elaborate under ''top'', if I remember correctly

Share this post


Link to post
Share on other sites
If you are using C++ you can do the following:

1. write a new operator for each of you classes, in where
you count the memory being allocated.
2. write custom allocators for whenever you use STL containers


No when you figure out how to do this, it should be easy for you
to sum all the memory allocated up somewhere.

This solution should prove to be portable,
and in case of win98, this might be the only way to get a precise result.

But if you think of it, it would perhaps be easier for you to install win2k/nt/xp and use the task manager provided there

Share this post


Link to post
Share on other sites
quote:
Original post by ZubZorro
If you are using C++ you can do the following:

1. write a new operator for each of you classes, in where
you count the memory being allocated.
2. write custom allocators for whenever you use STL containers


No when you figure out how to do this, it should be easy for you
to sum all the memory allocated up somewhere.




I don''t think this is going to be too accurate as it only counts the memory that you''ve allocated. It doesn''t take into account stuff like DLLs, etc.

Thanks for the Linux tip, though. it is sure to be helpful

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!