On Thursday, 31 March 2016 at 15:28:47 UTC, Nordlöw wrote:
Has anybody compiled and run a D program with TCMalloc instead of glibc's own PTMalloc?

The performance, especially multi-thread allocation, looks very promising:
http://goog-perftools.sourceforge.net/doc/tcmalloc.html

I tried adding either

-L-ltcmalloc
-L-ltcmalloc_minimal

to DMD but all these errors as

/usr/bin/ld: cannot find -ltcmalloc
/usr/bin/ld: cannot find -ltcmalloc_minimal

none of them works on my Ubuntu 15.10.

It's installed on my system via

sudo apt-get install libtcmalloc-minimal4

and placed at

/usr/lib/libtcmalloc_minimal_debug.so.4.2.6
/usr/lib/libtcmalloc_minimal.so.4.2.6
/usr/lib/libtcmalloc_minimal_debug.so.4
/usr/lib/libtcmalloc_minimal.so.4

What's wrong?

Please help.

You need to install the "-devel" version to get the it as a static library. On OpenSuse it's named gperftools-devel.

Maybe on ubuntu it's this one:

"libgoogle-perftools-dev"

http://packages.ubuntu.com/fr/trusty/amd64/libgoogle-perftools-dev/filelist, because it 
contains the "*.a" static library you wanna link in.


Reply via email to