You are here: Home / Debian GNU/Linux / System / Software / Install Hoard on Debian

Install Hoard on Debian

by Pierre-Yves Landuré last modified Dec 06, 2017 04:32

Hoard is a memory manager enhancing malloc function for multi-threaded softwares. It is designed to replace transparently the default system malloc.

This howto is tested on :

  • Debian 7.0 Wheezy
  • Ubuntu 13.10 Saucy Salamander

This howto is tested with these versions of Hoard :

  • 3.9
  • 3.10


Install the needed softwares :

command apt-get install build-essential

Download the software latest version:

command wget '' \
--quiet --no-check-certificate --output-document='/tmp/sf-downloader'
SOURCE="$(command bash '/tmp/sf-downloader' --tgz \
--generic='' \
'hoard' 'Hoard-VERSION-source.tar.gz')"

Go to the sources folder :

command pushd "${SOURCE}/src"

Detect the system architecture :

ARCH=$(command dpkg --print-architecture)
if [ "${ARCH}" = "i386" ]; then
elif [ "${ARCH}" = "amd64" ]; then

Compile the software version fitting the system architecture :

command make "linux-gcc-${ARCH}"

Install the software :

command install -c -m 644 '' '/usr/local/lib/'
cd "${SOURCE}/src/include"
command mkdir --parents '/usr/local/include/hoard' \
'/usr/local/include/superblocks' \
command find '.' -mindepth 2 -type f -name '*.h' \
| command sed -e 's|^\./||' \
| command xargs -iFILE install -c -m 644 FILE '/usr/local/include/FILE'

Exit the sources folder :

command popd

Delete the downloaded files :

command rm -r "${SOURCE}"


Use Hoard to optimize a given software (replace /usr/bin/software by the optimized command):

LD_PRELOAD='/usr/local/lib/' /usr/bin/software

If wished, setup the system to use Hoard as default memory manager (dangerous, reboot needed) :

# command echo 'LD_PRELOAD=/usr/local/lib/' >> '/etc/environment'
# command reboot