Problem with dmalloc Library
Hello experts,
I'm trying to use dmalloc (http://dmalloc.com) library to debug a program that I suspect is suffering from some kind of memory leak. To do this, I have wrote a very simple program to see how dmalloc is working! I have runed this program on 2 platforms 1)Ubuntu 32 bit 2)Suse 64 bit and it gives completely different results on these two platforms! Ultimately I need to run it on Suse, but I wonder why results are not the same on these platforms , and moreover they are not expected results. 1-Ubuntu: test.c Code:
#include <stdio.h> Code:
#include <stdio.h> Code:
CC=g++ here is the results after running: Quote:
after that in 11th run it generate the logfile and gives another kind of error, WHAT 's the problem? Why this happen? I expect that it generate a logfile everytime not just by chance On SUSE-64 bit: Here the problem is even worse. When I do not use dmalloc the program generate kind of error: output without dmalloc: Quote:
Quote:
Quote:
Thanks, amir |
Dude - just because a program has a bug, doesn't necessarily mean it's going to CRASH.
It'll crash if you're LUCKY (that way, at least you KNOW something is wrong!). So if you: 1) allocate 2 integers ... and then ... 2) use 10 integers That's pretty much the same as: 1) putting on a blindfold ... and then ... 2) flooring the accelerator Sometimes you might hit a hedge. Other times you might slam into a brick wall. It depends on the compiler, it depends on the platform ;) Just don't expect deterministic results for an irrational scenario, OK? ;) |
I think the question is more why dmalloc does not behave as expected. I suggest that OP visits their forum (if it works); I tried and get database errors, tried to report is and got email errors (relaying denied). Maybe the author must be contcted via his own webpage (link on the dmalloc page).
|
All times are GMT -5. The time now is 11:14 PM. |