glibc-trim

Created 7 years ago
Maintained by fweimer
glibc heap optimization
Members 2
Florian Weimer committed 7 years ago
This repository contains a small dynamic shared object which
periodically calls malloc_trim to optimize the glibc heap.

# Compilation

Just running make should be sufficient:

    $ make

# Usage

This command will start a shell session whose subprocesses will all
perform malloc_trim periodically:

     LD_PRELOAD=$PWD/libmalloctrim.so GLIBC_MALLOC_TRIM_PERIOD=60 /bin/bash

GLIBC_MALLOC_TRIM_PERIOD is measured in seconds and specifies the
interval between malloc_trim calls.

Note that some programs will be affected negatively by the additional
thread.