Jump to content
  • Advertisement


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


Memory Allocation

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

the search feature is not functioning so i dont know whether same post has been posted from other user sorry for that can i learn whether i left any unfreed memory, or freed all of allocated memory after execution of my application. is there a function which shows amount of unfreed memory (for platform windows) for specific thread/application ??? [edited by - yaskil on January 24, 2003 3:39:30 AM]

Share this post

Link to post
Share on other sites
I don't think such a thing exists, but I believe there are some programs out there that detect memory leaks.

Also, you could turn your malloc/new/free/delete calls using macros, something like this:

#define malloc(X) malloc(X); Memory::usedmem++

This would tell you not the amount of memory (which I find quite useless, and hard to get) but the number of times there was an allocation unmatched by an allocation (much more useful for debugging purposes).

Just create a class with a static long "usedmem" so you can access it from anywhere.

EDIT - stupid me... where did I see malloc has two parameters?

Extatica - a free 3d game engine
Available soon!
Click here to learn more

[edited by - ToohrVyk on January 24, 2003 3:59:36 AM]

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!