heap: add a way to print allocator statistics