avoid oddly high memory consuption when using malloc within threads
(libpthread)

Signed-off-by: nixnodes <code@nixnodes.net>