Jump to content
  • Advertisement
Sign in to follow this  
Decrius

Paul Nettle's MMGR not working correctly?

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

Hi, I've been using Paul Nettle's MMGR for quite some time, and noticed that other people DO see a file, line and function name in the logs, while I just see '??(00000)::??'. What is the problem and how can I solve that? Getting rid of memory leaks takes me LONG (before I actually know WHAT is not correct, and WHERE)...so it would be great if I can fix this. FYI: I use MingW32, so the __FILE__, __LINE__ and __FUNCTION__ are supported, but for some reason fail to work in the MMGR...

Share this post


Link to post
Share on other sites
Advertisement
Considered that, but isn't that linux only? I do have a linux OS on a crap PC here, and I can eventually emulate it on this machine, but I couldn't get anything like an IDE to work on Ubuntu :/

Share this post


Link to post
Share on other sites
yeah, linux only AFAIK.

Assuming your code builds fine with the gcc version used in the distro you're using, valgrind should be pretty easy to get working.

Share this post


Link to post
Share on other sites
I had this problem, too. My solution was to include the mmgr.h header in every source file that needed checking.

Share this post


Link to post
Share on other sites
Quote:
Original post by odessi
I had this problem, too. My solution was to include the mmgr.h header in every source file that needed checking.
That's the solution. mmgr.h includes macros for new and delete, and those need included in every file. The documentation mentions something about thi; you need to make sure you #include all library headers (e.g. STL), then mmgr.h, then your own headers.

Personally, I found this to be a major PITA, and just ended up writing my own memory manager that overloads new and delete globally.

Share this post


Link to post
Share on other sites
Some compilers (I've heard it said about both GCC and Microsoft's compiler) can be set up to include a file in every file it processes. I've never had the need though, so I never looked into the specifics of how.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Quote:
Original post by odessi
I had this problem, too. My solution was to include the mmgr.h header in every source file that needed checking.
That's the solution. mmgr.h includes macros for new and delete, and those need included in every file. The documentation mentions something about thi; you need to make sure you #include all library headers (e.g. STL), then mmgr.h, then your own headers.

Personally, I found this to be a major PITA, and just ended up writing my own memory manager that overloads new and delete globally.


Hmm...that is rather annoying :(, might consider writting one myself aswell :P, but first this project hehe :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!