A
A
Aborigen10202019-05-15 08:48:25
linux
Aborigen1020, 2019-05-15 08:48:25

Replacing malloc with tcmalloc?

Hello!
I replaced tcmalloc to run a specific application, I saw positive changes.
I wanted to replace the standard malloc with tcmalloc.
I read that to replace it, it is enough to specify the path to the new library in the LD_PRELOAD variable, but on my Debian 9 system, this variable is empty.
Is it possible to replace the standard malloc in the system with a non-standard memory manager?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-05-15
@Zarom

There are only two options:
However, the doc says:
If you still want to use LD_PRELOAD throughout your system, then

echo "LD_PRELOAD=/usr/lib/libtcmalloc.so" >> /etc/environment

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question