|
From: Charles C. <cco...@no...> - 2003-09-12 22:39:14
|
Using Valgrind 20030725. I did this simple test:
#include <stdio.h>
#include <valgrind.h>
int main(void)
{
printf("running on valgrind? %d\n", RUNNING_ON_VALGRIND);
return 0;
}
Strangely, it claims it's not running under Valgrind:
[ccoffing@ccoffing1 ccoffing]$ valgrind ./test
==9093== Memcheck, a.k.a. Valgrind, a memory error detector for
x86-linux.
==9093== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==9093== Using valgrind-20030725, a program supervision framework for
x86-linux.==9093== Copyright (C) 2000-2003, and GNU GPL'd, by Julian
Seward.
==9093== Estimated CPU clock rate is 498 MHz
==9093== For more details, rerun with: -v
==9093==
running on valgrind? 0
==9093==
==9093== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==9093== malloc/free: in use at exit: 0 bytes in 0 blocks.
==9093== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==9093== For a detailed leak analysis, rerun with: --leak-check=yes
==9093== For counts of detected errors, rerun with: -v
Likewise, VALGRIND_MAKE_READABLE, VALGRIND_MAKE_WRITABLE, etc. don't
seem to do anything. I tried this earlier on a 1.9.x build, and it
didn't work there either.
What am I doing wrong?
Thanks,
Charles
|