I am trying to profile some C++ programs on MacOSX. So I built google-perftools, wrote a program, compiled using MacPorts g++ 4.7, with -g compiler fla
google-perftools
-g
This seems to be related to the address space layout randomization (ASLR) introduced in OS X 10.5
I've filed issue #562 on the gperftools issue tracker. You can disable ASLR by passing -Wl,-no_pie.
-Wl,-no_pie
Also, if you're not bound to use gperftools, Instruments (comes with Xcode) is worth a try.
gperftools
Instruments
Xcode