Difference between -Os and -O2

Nicholas Sherlock n.sherlock@gmail.com
Tue Apr 28 10:24:00 GMT 2009

Hieu Le Trung wrote:
> Nicholas,
> I'm not sure that I can try with Valgrind, because it's a shared
> library. And the Valgrind does not work on MIPS. I have the code
> compiled successful on x86, but the issue currently is shared library.
> I've create an empty executable file, link with the .so and try to run
> with Valgrind but I'm not sure it is correct or not.
> Is there any way to use Valgrind with a shared library?

Unfortunately, I've never run Valgrind before, since I'm on Windows. I 
have heard a lot of good things about its capabilities, though. If you 
can't run Valgrind, at least try out a simpler memory debugger like 
dmalloc or Electric Fence. They find a much smaller set of bugs, but 
they're still useful.

Nicholas Sherlock

More information about the Gcc-help mailing list