Paul Nettle's MMGR not working correctly?

Started by
6 comments, last by Decrius 15 years, 9 months ago
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...
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Advertisement
Probably not the answer you're after, but as your code is good with gcc, why not try valgrind instead?
[size="1"]
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 :/
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
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.
[size="1"]
I had this problem, too. My solution was to include the mmgr.h header in every source file that needed checking.
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.
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.
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 :)

[size="2"]SignatureShuffle: [size="2"]Random signature images on fora

This topic is closed to new replies.

Advertisement